unit tests for error handling
This commit is contained in:
parent
6f45991600
commit
57e8b19a8b
2 changed files with 401 additions and 1 deletions
|
@ -165,5 +165,5 @@ func WriteError(w http.ResponseWriter, r *http.Request, err error, logger *slog.
|
|||
e := oidc.DefaultToServerError(statusError.parent, statusError.parent.Error())
|
||||
|
||||
logger.Log(r.Context(), e.LogLevel(), "request error", "oidc_error", e)
|
||||
httphelper.MarshalJSONWithStatus(w, oidc.DefaultToServerError(e, e.Error()), statusError.statusCode)
|
||||
httphelper.MarshalJSONWithStatus(w, e, statusError.statusCode)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue