raise | R Documentation |
Interrupts request processing and signals RestRserve to return HTTPError
raise(x)
x |
instance of Response. Can be created using HTTPError. see examples. |
None - stops execution of the current expression and executes an error action.
HTTPError Application
# catch exception
res = try(raise(HTTPError$bad_request()), silent = TRUE)
cond = attr(res, "condition")
# response is a valid Response instace
identical(cond$response$body$error, "400 Bad Request")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.