Need way to trigger an HTTP error, preferably with custom message #3

Closed
opened 2024-12-07 22:57:29 -07:00 by sashakoshka · 0 comments
Owner

The line {{httpPanic 405 "Only POST is supported"}} would immediately cause the template to stop executing and the server to display the error page with the given code and message. This could be accomplished by having a sentinel error in the http package that pairs a status code with a message. The HTTP handler could then check for this.

The line `{{httpPanic 405 "Only POST is supported"}}` would immediately cause the template to stop executing and the server to display the error page with the given code and message. This could be accomplished by having a sentinel error in the http package that pairs a status code with a message. The HTTP handler could then check for this.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sashakoshka/step#3
No description provided.