add client tracing
All checks were successful
pr / test (pull_request) Successful in 1m36s
lint / lint (pull_request) Successful in 10m37s

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2024-04-22 23:39:21 +03:00
parent 26dd2eb405
commit 781dee03db
2 changed files with 66 additions and 8 deletions

View File

@@ -262,6 +262,10 @@ func CodeIn(err interface{}, codes ...int32) bool {
// FromError try to convert go error to *Error
func FromError(err error) *Error {
if err == nil {
return nil
}
if verr, ok := err.(*Error); ok && verr != nil {
return verr
}