condition: Define a condition (like an error) with support for HTTP...

View source: R/error-handling.R

conditionR Documentation

Define a condition (like an error) with support for HTTP status codes

Description

For more information on conditions and errors see http://adv-r.had.co.nz/Exceptions-Debugging.html. See also conditions.

Usage

condition(subclass, ..., code = 500L, request_id = NULL, call = sys.call(-1))

Arguments

subclass

conditions returned by this function will be of the class c(subclass, "simpleError", "error", "condition").

...

zero or more objects which can be coerced to character (and which are pasted together with no separator). This forms the error message.

code

HTTP status code to return (if applicable). Defaults to 500, which is a generic "Internal Server Error". This is used when errors are to be returned to an API Gateway.

request_id

character. Used in error handling during event decomposition, when it's possible that a request ID might be known but the event hasn't been fully examined yet.

call

call expression


lambdr documentation built on Nov. 25, 2023, 5:08 p.m.