Boom (Boom v0.1.0) View Source
Boom
is inspired by the NodeJS package @hapi/boom
It allows you to respond with json errors easily.
Link to this section Summary
Functions
Responds with 502 - Bad Gateway
Responds with 400 - Bad Request
Responds with 509 - Bandwidth Limit Exceeded
Responds with 409 - Conflict
Responds with 417 - Expectation Failed
Responds with 424 - Failed Dependency
Responds with 403 - Forbidden
Responds with 504 - Gateway Time-out
Responds with 410 - Gone
Responds with 505 - HTTP Version Not Supported
Responds with 418 - I'm a teapot
Responds with 507 - Insufficient Storage
Responds with 500 - Internal Server Error
Responds with 411 - Length Required
Responds with 423 - Locked
Responds with 508 - Loop Detected
Responds with 405 - Method Not Allowed
Responds with 421 - Misdirected Request
Responds with 511 - Network Authentication Required
Responds with 406 - Not Acceptable
Responds with 510 - Not Extended
Responds with 404 - Not Found
Responds with 501 - Not Implemented
Responds with 402 - Payment Required
Responds with 412 - Precondition Failed
Responds with 428 - Precondition Required
Responds with 407 - Proxy Authentication Required
Responds with 413 - Request Entity Too Large
Responds with 431 - Request Header Fields Too Large
Responds with 408 - Request Time-out
Responds with 414 - Request-URI Too Large
Responds with 416 - Requested Range Not Satisfiable
Responds with 503 - Service Unavailable
Responds with 429 - Too Many Requests
Responds with 401 - Unauthorized
Responds with 451 - Unavailable For Legal Reasons
Responds with 425 - Unordered Collection
Responds with 422 - Unprocessable Entity
Responds with 415 - Unsupported Media Type
Responds with 426 - Upgrade Required
Responds with 506 - Variant Also Negotiates
Link to this section Functions
Specs
bad_gateway(Plug.Conn.t(), String.t() | nil) :: Plug.Conn.t()
Responds with 502 - Bad Gateway
Specs
bad_request(Plug.Conn.t(), String.t() | nil) :: Plug.Conn.t()
Responds with 400 - Bad Request
Specs
bandwidth_limit_exceeded(Plug.Conn.t(), String.t() | nil) :: Plug.Conn.t()
Responds with 509 - Bandwidth Limit Exceeded
Specs
conflict(Plug.Conn.t(), String.t() | nil) :: Plug.Conn.t()
Responds with 409 - Conflict
Specs
expectation_failed(Plug.Conn.t(), String.t() | nil) :: Plug.Conn.t()
Responds with 417 - Expectation Failed
Specs
failed_dependency(Plug.Conn.t(), String.t() | nil) :: Plug.Conn.t()
Responds with 424 - Failed Dependency
Specs
forbidden(Plug.Conn.t(), String.t() | nil) :: Plug.Conn.t()
Responds with 403 - Forbidden
Specs
gateway_timeout(Plug.Conn.t(), String.t() | nil) :: Plug.Conn.t()
Responds with 504 - Gateway Time-out
Specs
gone(Plug.Conn.t(), String.t() | nil) :: Plug.Conn.t()
Responds with 410 - Gone
Specs
http_version_not_supported(Plug.Conn.t(), String.t() | nil) :: Plug.Conn.t()
Responds with 505 - HTTP Version Not Supported
Specs
im_a_teapot(Plug.Conn.t(), String.t() | nil) :: Plug.Conn.t()
Responds with 418 - I'm a teapot
Specs
insufficient_storage(Plug.Conn.t(), String.t() | nil) :: Plug.Conn.t()
Responds with 507 - Insufficient Storage
Specs
internal_server_error(Plug.Conn.t(), String.t() | nil) :: Plug.Conn.t()
Responds with 500 - Internal Server Error
Specs
length_required(Plug.Conn.t(), String.t() | nil) :: Plug.Conn.t()
Responds with 411 - Length Required
Specs
locked(Plug.Conn.t(), String.t() | nil) :: Plug.Conn.t()
Responds with 423 - Locked
Specs
loop_detected(Plug.Conn.t(), String.t() | nil) :: Plug.Conn.t()
Responds with 508 - Loop Detected
Specs
method_not_allowed(Plug.Conn.t(), String.t() | nil) :: Plug.Conn.t()
Responds with 405 - Method Not Allowed
Specs
misdirected_request(Plug.Conn.t(), String.t() | nil) :: Plug.Conn.t()
Responds with 421 - Misdirected Request
Specs
network_authentication_required(Plug.Conn.t(), String.t() | nil) :: Plug.Conn.t()
Responds with 511 - Network Authentication Required
Specs
not_acceptable(Plug.Conn.t(), String.t() | nil) :: Plug.Conn.t()
Responds with 406 - Not Acceptable
Specs
not_extended(Plug.Conn.t(), String.t() | nil) :: Plug.Conn.t()
Responds with 510 - Not Extended
Specs
not_found(Plug.Conn.t(), String.t() | nil) :: Plug.Conn.t()
Responds with 404 - Not Found
Specs
not_implemented(Plug.Conn.t(), String.t() | nil) :: Plug.Conn.t()
Responds with 501 - Not Implemented
Specs
payment_required(Plug.Conn.t(), String.t() | nil) :: Plug.Conn.t()
Responds with 402 - Payment Required
Specs
precondition_failed(Plug.Conn.t(), String.t() | nil) :: Plug.Conn.t()
Responds with 412 - Precondition Failed
Specs
precondition_required(Plug.Conn.t(), String.t() | nil) :: Plug.Conn.t()
Responds with 428 - Precondition Required
Specs
proxy_authentication_required(Plug.Conn.t(), String.t() | nil) :: Plug.Conn.t()
Responds with 407 - Proxy Authentication Required
Specs
request_entity_too_large(Plug.Conn.t(), String.t() | nil) :: Plug.Conn.t()
Responds with 413 - Request Entity Too Large
Specs
request_header_fields_too_large(Plug.Conn.t(), String.t() | nil) :: Plug.Conn.t()
Responds with 431 - Request Header Fields Too Large
Specs
request_timeout(Plug.Conn.t(), String.t() | nil) :: Plug.Conn.t()
Responds with 408 - Request Time-out
Specs
request_uri_too_long(Plug.Conn.t(), String.t() | nil) :: Plug.Conn.t()
Responds with 414 - Request-URI Too Large
Specs
requested_range_not_satisfiable(Plug.Conn.t(), String.t() | nil) :: Plug.Conn.t()
Responds with 416 - Requested Range Not Satisfiable
Specs
too_many_requests(Plug.Conn.t(), String.t() | nil) :: Plug.Conn.t()
Responds with 429 - Too Many Requests
Specs
unauthorized(Plug.Conn.t(), String.t() | nil) :: Plug.Conn.t()
Responds with 401 - Unauthorized
Specs
unordered_collection(Plug.Conn.t(), String.t() | nil) :: Plug.Conn.t()
Responds with 425 - Unordered Collection
Specs
unprocessable_entity(Plug.Conn.t(), String.t() | nil) :: Plug.Conn.t()
Responds with 422 - Unprocessable Entity
Specs
unsupported_media_type(Plug.Conn.t(), String.t() | nil) :: Plug.Conn.t()
Responds with 415 - Unsupported Media Type
Specs
upgrade_required(Plug.Conn.t(), String.t() | nil) :: Plug.Conn.t()
Responds with 426 - Upgrade Required
Specs
variant_also_negotiates(Plug.Conn.t(), String.t() | nil) :: Plug.Conn.t()
Responds with 506 - Variant Also Negotiates