Difference between revisions of "Template:LSL Extended Error HTTP"
Jump to navigation
Jump to search
m (Replaced <source> with <syntaxhighlight>, added a few wikilinks, corrected very minor typos) |
m (→Extended Errors: Removed extraneous brackets on external iink to RFC 7807) |
||
Line 19: | Line 19: | ||
====Extended Errors==== | ====Extended Errors==== | ||
When the [[HTTP_EXTENDED_ERROR]] parameter is [[TRUE]], [[llHTTPRequest]] will return extended error information to the script through the [[http_response]] event. A detailed error explanation is returned as a [[Json usage in LSL|JSON blob]] blob in the body of the event and an error code is provided through the HTTP status. The format of the [[Json usage in LSL|JSON blob]] is described in detail in | When the [[HTTP_EXTENDED_ERROR]] parameter is [[TRUE]], [[llHTTPRequest]] will return extended error information to the script through the [[http_response]] event. A detailed error explanation is returned as a [[Json usage in LSL|JSON blob]] blob in the body of the event and an error code is provided through the HTTP status. The format of the [[Json usage in LSL|JSON blob]] is described in detail in [https://tools.ietf.org/html/rfc7807 RFC 7807]. | ||
<syntaxhighlight lang="JavaScript"> | <syntaxhighlight lang="JavaScript"> | ||
Line 29: | Line 29: | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{{!}} class="sortable" {{Prettytable|style=margin-top:0;}} | {{{!}} class="sortable" {{Prettytable|style=margin-top:0;}} |
Latest revision as of 23:08, 10 December 2024
Extended Errors
When the HTTP_EXTENDED_ERROR parameter is TRUE, llHTTPRequest will return extended error information to the script through the http_response event. A detailed error explanation is returned as a JSON blob blob in the body of the event and an error code is provided through the HTTP status. The format of the JSON blob is described in detail in RFC 7807.
{
"type": "http://wiki.secondlife.com/wiki/llHTTPRequest", // reference to the documentation for llHTTPRequest.
"title": "Error Title", // A human readable title for the error.
"detail": "Description of error condition.", // A human readable description of the error condition.
"status": 400 // The HTTP Status for the call.
}
Error | Description | |
---|---|---|
Method Not Allowed | 405 | The HTTP method specified for HTTP_METHOD is not supported. |
Unsupported Media Type | 415 | The mime type specified in HTTP_MIMETYPE or HTTP_ACCEPT is not supported. |
Enhance Your Calm | 420 | HTTP requests have been throttled for this object, script, or owner. Back off making further HTTP calls until the throttle has cleared. |
HTTP Unavailable | 470 | HTTP and/or HTTPS have been disabled in this region. |
Invalid URL | 471 | The URL passed to llHTTPRequest contains invalid characters or uses a protocol other than http or https. |
Parameter Error | 472 | There was an issue with the parameters passed to llHTTPRequest. One of the following conditions may be the problem
|
Illegal Request Header | 473 | A request header passed to HTTP_CUSTOM_HEADER is not allowed. |
Too Many Headers | 474 | Too many request headers have been specified with HTTP_CUSTOM_HEADER. |