
gdscript.core.ApiError.handlebars Maven / Gradle / Ivy
The newest version!
extends {{>partials/api_error_parent_class}}
class_name {{>partials/api_error_class_name}}
{{>partials/disclaimer_autogenerated}}
# Error wrapper provided to error callbacks
# =========================================
#
# Whenever this OAS client fails to comply to your request, for any reason,
# it will trigger the error callback, with an instance of this as parameter.
#
## Helps finding the error in the code, among other things.
## Could be a UUID, or even a translation key, so long as it's unique.
## Right now we're mostly using a lowercase ~namespace joined by dots. (.)
@export var identifier := ""
## A message for humans. May be multiline.
@export var message := ""
## One of Godot's ERR_XXXX, when relevant.
@export var internal_code := OK
## The HTTP response code, if any. (usually >= 400)
## DEPRECATED: prefer reading from response object below
@export var response_code := HTTPClient.RESPONSE_OK
## The HTTP response, if any.
@export var response: {{>partials/api_response_class_name}}
func _to_string() -> String:
var s := "{{>partials/api_error_class_name}}"
if identifier:
s += " %s" % identifier
if message:
s += " %s" % message
if response:
s += "\n%s" % str(response)
return s
© 2015 - 2025 Weber Informatics LLC | Privacy Policy