porcelain_stop | R Documentation |
Throw an error from an endpoint. This function is intended to allow target functions to throw nice errors back through the API.
porcelain_stop(message, code = "ERROR", errors = NULL, status_code = 400L, ...)
message |
The human-readable message of the error. Ignored
if |
code |
Optional code for the error - if not given, then
|
errors |
A named list of errors - use this to signal multiple error conditions as key/value pairs. |
status_code |
The HTTP status code to use. The default (400) means "bad request" which should be a reasonable catch-all for bad user data. |
... |
Additional named args to be included as fields in the
error response JSON. The values must be in format ready for
serialization to JSON using |
Nothing, as this function throws an error
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.