MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / NewHTTPError

Function NewHTTPError

base/error.go:111–113  ·  view source on GitHub ↗

NewHTTPError creates an HTTPError with an http status code and a message. Use HTTPErrorf for printf style messages.

(status int, message string)

Source from the content-addressed store, hash-verified

109
110// NewHTTPError creates an HTTPError with an http status code and a message. Use HTTPErrorf for printf style messages.
111func NewHTTPError(status int, message string) *HTTPError {
112 return &HTTPError{status, message}
113}
114
115// Attempts to map an error to an HTTP status code and message.
116// Defaults to 500 if it doesn't recognize the error. Returns 200 for a nil error.

Callers 15

NewSyncRunnerWithLoggingFunction · 0.92
handleCreateDBMethod · 0.92
handlePutDbConfigMethod · 0.92
handleSetLoggingMethod · 0.92
updatePrincipalMethod · 0.92
handleOIDCRefreshMethod · 0.92
mutateDbConfigMethod · 0.92
readFromPathFunction · 0.92
verifyGoogleFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected