LogErr sends the given "err" as message to the client and prints that error to using the "LogError" package-level function, which can be customized.
(ctx *context.Context, err error)
| 360 | // LogErr sends the given "err" as message to the client and prints that |
| 361 | // error to using the "LogError" package-level function, which can be customized. |
| 362 | func (e ErrorCodeName) LogErr(ctx *context.Context, err error) { |
| 363 | if SkipCanceled && (ctx.IsCanceled() || context.IsErrCanceled(err)) { |
| 364 | return |
| 365 | } |
| 366 | |
| 367 | LogError(ctx, err) |
| 368 | |
| 369 | e.Message(ctx, "server error") |
| 370 | } |
| 371 | |
| 372 | // HandleAPIError handles remote server errors. |
| 373 | // Optionally, use it when you write your server's HTTP clients using the the /x/client package. |
no test coverage detected