Difference between revisions of "Template:LSL Extended Error HTTP"
Jump to navigation
Jump to search
Rider Linden (talk | contribs) |
m (Replaced <source> with <syntaxhighlight>, added a few wikilinks, corrected very minor typos) |
||
Line 3: | Line 3: | ||
{{LSL Function/boolean|verify|if=*|td=the server SSL certificate must be verifiable using one of the standard certificate authorities|fd=any server SSL certificate will be accepted.}} | {{LSL Function/boolean|verify|if=*|td=the server SSL certificate must be verifiable using one of the standard certificate authorities|fd=any server SSL certificate will be accepted.}} | ||
{{LSL Function/boolean|noisy|if=*|td=shout error messages to DEBUG_CHANNEL if the outgoing request rate exceeds the server limit|fd=the error messages are suppressed.}} | {{LSL Function/boolean|noisy|if=*|td=shout error messages to [[DEBUG_CHANNEL]] if the outgoing request rate exceeds the [[Limits|server limit]]|fd=the error messages are suppressed.}} | ||
{{LSL Function/boolean|send_header|if=when|td=the {{String|Pragma: no-cache}} header is sent|fd=no {{String|Pragma}} header is sent.}} | {{LSL Function/boolean|send_header|if=when|td=the {{String|Pragma: no-cache}} header is sent|fd=no {{String|Pragma}} header is sent.}} | ||
Line 12: | Line 12: | ||
{{#vardefine:p_value_hover|The value of the header to be set.}} | {{#vardefine:p_value_hover|The value of the header to be set.}} | ||
{{#vardefine:p_length_hover|The maximum length allowed for an HTTP body | {{#vardefine:p_length_hover|The maximum length allowed for an HTTP body; this is also capped by the VM in use.}} | ||
{{#vardefine:p_MIME_type_hover|}} | {{#vardefine:p_MIME_type_hover|}} | ||
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 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 [[https://tools.ietf.org/html/rfc7807 RFC 7807]]. | 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"> | ||
{ | { | ||
"type": "http://wiki.secondlife.com/wiki/llHTTPRequest", // reference to the documentation for llHTTPRequest. | "type": "http://wiki.secondlife.com/wiki/llHTTPRequest", // reference to the documentation for llHTTPRequest. | ||
Line 28: | Line 28: | ||
"status": 400 // The HTTP Status for the call. | "status": 400 // The HTTP Status for the call. | ||
} | } | ||
</ | </syntaxhighlight> | ||
Line 55: | Line 55: | ||
{{!}} Invalid URL | {{!}} Invalid URL | ||
{{!}} 471 | {{!}} 471 | ||
{{!}} The URL passed to llHTTPRequest contains invalid characters or uses a protocol other than http or https. | {{!}} The URL passed to [[llHTTPRequest]] contains invalid characters or uses a protocol other than http or https. | ||
{{!}}- | {{!}}- | ||
{{!}} Parameter Error | {{!}} Parameter Error | ||
{{!}} 472 | {{!}} 472 | ||
{{!}} There was an issue with the parameters passed to llHTTPRequest. One of the following conditions may be the problem | {{!}} There was an issue with the parameters passed to [[llHTTPRequest]]. One of the following conditions may be the problem | ||
* The type of the parameter value may be incorrect. | * The type of the parameter value may be incorrect. | ||
* The parameter key may be something other than an integer. | * The parameter key may be something other than an integer. | ||
Line 71: | Line 71: | ||
{{!}} Too Many Headers | {{!}} Too Many Headers | ||
{{!}} 474 | {{!}} 474 | ||
{{!}} | {{!}} Too many request headers have been specified with [[HTTP_CUSTOM_HEADER]]. | ||
{{!}}} | {{!}}} |
Revision as of 15:06, 7 April 2022
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. |