Need way to trigger an HTTP error, preferably with custom message #3
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.