MCPcopy Create free account
hub / github.com/kataras/iris / OnErrorCode

Method OnErrorCode

core/router/party.go:141–141  ·  view source on GitHub ↗

OnErrorCode registers a handlers chain for this `Party` for a specific HTTP status code. Read more at: http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml Look `UseError` and `OnAnyErrorCode` too.

(statusCode int, handlers ...context.Handler)

Source from the content-addressed store, hash-verified

139 // Read more at: http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
140 // Look `UseError` and `OnAnyErrorCode` too.
141 OnErrorCode(statusCode int, handlers ...context.Handler) []*Route
142 // OnAnyErrorCode registers a handlers chain for all error codes
143 // (4xxx and 5xxx, change the `ClientErrorCodes` and `ServerErrorCodes` variables to modify those)
144 // Look `UseError` and `OnErrorCode` too.

Callers 15

mainFunction · 0.65
mainFunction · 0.65
mainFunction · 0.65
newAppFunction · 0.65
registerErrorsFunction · 0.65
mainFunction · 0.65
newAppFunction · 0.65
newAppFunction · 0.65
mainFunction · 0.65
mainFunction · 0.65
newAppFunction · 0.65
mainFunction · 0.65

Implementers 1

APIBuildercore/router/api_builder.go

Calls

no outgoing calls

Tested by 6

TestProxyFunction · 0.52
TestPartyOnErrorCodeFunction · 0.52
TestUseWrapOrderFunction · 0.52
TestSwitchHostsFunction · 0.52