Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewErrorReportingHandler ¶
func NewErrorReportingHandler(errorReturningHandler ErrorReturningHTTPHandler) http.Handler
NewErrorReportingHandler wraps an ErrorReturningHTTPHandler with error reporting
func ReportError ¶
ReportError reports an error to Sentry
func SetupErrorReporting ¶
func SetupErrorReporting(sentryDSN, environment string)
SetupErrorReporting configures the Sentry SDK for error reporting
Types ¶
type ErrorReturningHTTPHandler ¶
type ErrorReturningHTTPHandler func(http.ResponseWriter, *http.Request) error
ErrorReturningHTTPHandler is a HTTP handler function that returns an error
type HTTPError ¶
type HTTPError struct {
// contains filtered or unexported fields
}
HTTPError is an error that also has an associated HTTP status code
func NewHTTPError ¶
NewHTTPError creates a new HTTPError
func (HTTPError) StatusCode ¶
StatusCode returns the HTTP status code associated with the error
Click to show internal directories.
Click to hide internal directories.