-
-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Labels
bugSomething is not working.Something is not working.
Description
Preflight checklist
- I could not find a solution in the existing issues, docs, nor discussions.
- I agree to follow this project's Code of Conduct.
- I have read and am following this repository's Contribution Guidelines.
- I have joined the Ory Community Slack.
- I am signed up to the Ory Security Patch Newsletter.
Describe the bug
I noticed by using the (h *JSONWriter) WriteErrorCode function, that the header is correctly set, but the JSON response returns a 500 status code and message.
Is this a bug or am i interpreting the purpose of the function wrong?
Reproducing the bug
h.d.Writer().WriteErrorCode(w, r, 401, errors.New("error"))Version
v0.10.2
On which operating system are you observing this issue?
Linux
In which environment are you deploying?
None
Additional Context
My workaround right now:
h.d.Writer().WriteError(w, r, herodot.DefaultError{
CodeField: 401,
ErrorField: errors.New("error"),
})Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething is not working.Something is not working.
