Documentation
¶
Overview ¶
Package httperr writes JSON error responses in either Auth0 Management API shape or Auth0 Authentication API shape.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WriteAuth ¶
func WriteAuth(w http.ResponseWriter, status int, errCode, description string)
WriteAuth writes an Authentication-API-shaped JSON error. Same disconnect semantics as WriteMgmt — see its doc for why the encode error is dropped.
func WriteMgmt ¶
func WriteMgmt(w http.ResponseWriter, status int, errStr, message, errorCode string)
WriteMgmt writes a Management-API-shaped JSON error.
Encode errors here only fire when the client has already disconnected (broken pipe, write deadline) — the status line and headers have already been written by that point and there is nothing useful to do about it, so the result is intentionally discarded.
Types ¶
Click to show internal directories.
Click to hide internal directories.