This set of functions throws a classed error indicating that the request
should be responded to with an HTTP problem according to the spec defined in
RFC 9457 or a bare response
code. These conditions should be caught and handled by the handle_problem()
function.
abort_http_problem(
code,
detail,
title = NULL,
type = NULL,
instance = NULL,
...,
message = detail,
call = caller_env()
)abort_status(code, message = status_phrase(code), ..., call = caller_env())
abort_bad_request(
detail,
instance = NULL,
...,
message = detail,
call = caller_env()
)
abort_unauthorized(
detail,
instance = NULL,
...,
message = detail,
call = caller_env()
)
abort_forbidden(
detail,
instance = NULL,
...,
message = detail,
call = caller_env()
)
abort_not_found(
detail,
instance = NULL,
...,
message = detail,
call = caller_env()
)
abort_method_not_allowed(
detail,
instance = NULL,
...,
message = detail,
call = caller_env()
)
abort_not_acceptable(
detail,
instance = NULL,
...,
message = detail,
call = caller_env()
)
abort_conflict(
detail,
instance = NULL,
...,
message = detail,
call = caller_env()
)
abort_gone(detail, instance = NULL, ..., message = detail, call = caller_env())
abort_internal_error(
detail,
instance = NULL,
...,
message = detail,
call = caller_env()
)
handle_problem(response, cnd)
is_reqres_problem(cnd)
The HTTP status code to use
A string detailing the problem. Make sure the information given does not pose a security risk
A human-readable title of the issue. Should not vary from
instance to instance of the specific issue. If NULL then the status
code title is used
A URI that uniquely identifies this type of problem. The URI
must resolve to an HTTP document describing the problem in human readable
text. If NULL, the most recent link to the given status code definition
is used
A unique identifier of the specific instance of this problem that can be used for further debugging. Can be omitted.
Arguments passed on to rlang::error_cnd
classThe condition subclass.
use_cli_formatWhether to use the cli package to format
message. See local_use_cli().
traceA trace object created by trace_back().
parentA parent condition object.
A default message to inform the user about the condition when it is signalled.
A function call to be included in the error message. If an execution environment of a running function, the corresponding function call is retrieved.
The Response object associated with the request that created the condition
The thrown condition