UserError writes the json-encoded user error.
(ctx context.Context, w http.ResponseWriter, err *usererror.Error)
| 70 | |
| 71 | // UserError writes the json-encoded user error. |
| 72 | func UserError(ctx context.Context, w http.ResponseWriter, err *usererror.Error) { |
| 73 | log.Ctx(ctx).Debug().Err(err).Msgf("operation resulted in user facing error") |
| 74 | |
| 75 | JSON(w, err.Status, err) |
| 76 | } |
searching dependent graphs…