Skip to content

ref: Standardization of errors creation

Pavlo Strokov requested to merge ps-ref-fix into master

Replace usage of status.Errorf() with helper.Errf() to make error creation more standard. Replace old %v with new %w for proper error wrapping. Replace fmt.Errorf() with errors.New() if used without a reason (no wrapping or extra parameters for error text). Remove redundant prefix from error returned by RPC call. Return Internal code in case of an unexpected operation failure instead of Undefined by using helper.ErrInternal(). Add context to the error to make it more descriptive and standard.

Check error type to convert it to the corresponding error code.

Part of: #4471 (closed)

Edited by Pavlo Strokov

Merge request reports