Skip to content

diff: Standardize errors creation

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

Replace the old %v format with the new format for error wrapping: %w. This will allow extracting errors from the text context and verify error equality more strictly. The status.Errorf() calls are replaced with function calls from structerr package corresponding to the used status code. The checks to define if an error is a status package entity are not needed if functions from the structerr package are used. They detect status entities internally and prevent double-wrapping. Prefixes which are the same as gRPC method names are removed from the error messages to eliminate redundancy.

Part of: #4471 (closed)

Edited by Pavlo Strokov

Merge request reports