voxel.voxcast.ondemand.error_documents.create
Add a custom error document for handling HTTP responses of the specified response code.
Parameters
device_id(required)- Numeric Voxel device id, available from devices.list
location_id(required)- A location_id from voxcast.ondemand.locations.list identifying the origin and path to configure.
response_code(required)- The HTTP response code we want to handle.
document(required)- The document that should handle the specified response code.
Example Response
<rsp stat="ok"/>
Notes
Error documents follow similar (but not identical)
conventions to the Apache
ErrorDocument directive. You may specify either
a complete HTTP URL (e.g., "http://example.com/errors/404.html"),
to which the client will be redirected using a 302 HTTP response
code and a Location header; or a simple message
string (e.g., "Document not found"), which must be enclosed in
double-quotes and may contain HTML in which all double-quote
characters are escaped, i.e., '\"'. You may also
specify "default" (no quotes) to use VoxCAST's internal error
documents, for specific Locations that fall underneath a more
general Location's path, if you do not desire to use the more
general Location's error document. You may not specify an error
document for the HTTP 401 response code. In general, if you use
an external URL as your error document, you should ensure that it
returns the correct response code (i.e., an error document for
404s should return a 404 HTTP response code along with its
content). Additionally, we recommend you do not point
users to an error document on your CDN origin server for 50x
response codes; often, 50x errors are related to origin outages
or overloads, and directing further traffic to the origin could
exacerbate the problem.
Method Specific Error Codes
100: Unknown device- The device_id passed in can't be matched to a valid device.
201: Device action failed (reason)- An error occurred while performing an action on a device. A reason may be specified in parenthesis.

