InternalErrorf writes the json-encoded message with internal server error status code.
(ctx context.Context, w http.ResponseWriter, format string, args ...interface{})
| 65 | |
| 66 | // InternalErrorf writes the json-encoded message with internal server error status code. |
| 67 | func InternalErrorf(ctx context.Context, w http.ResponseWriter, format string, args ...interface{}) { |
| 68 | UserError(ctx, w, usererror.Newf(http.StatusInternalServerError, format, args...)) |
| 69 | } |
| 70 | |
| 71 | // UserError writes the json-encoded user error. |
| 72 | func UserError(ctx context.Context, w http.ResponseWriter, err *usererror.Error) { |