Movatterモバイル変換


[0]ホーム

URL:


  1. Home
  2. Reference documentation
  3. VCL reference
  4. Variables in VCL
  5. Miscellaneous

fastly.error

STRING, can be read andunset, but notset.

Available inall subroutines.

Contains the last error code raised, otherwisenot set.

Some functions that can raise errors don't unsetfastly.error upon beingcalled. When error-checking an important operation, you can ensure you'reresponding only to relevant errors by unsettingfastly.error beforehand:

declare local var.keySTRING= ...;
declare local var.ivSTRING= ...;
declare local var.ciphertextSTRING= ...;
declare local var.plaintextSTRING;
# ... unrelated calls that may produce errors ...
# Clear fastly.error before an important operation
unsetfastly.error;
set var.plaintext= crypto.decrypt_hex(aes256, cbc, nopad, var.key, var.iv, var.ciphertext);
# If fastly.error is set here, we're certain it's due to the call we're concerned with
if (fastly.error=="EBADDECRYPT") {
error403"Wrong key";
}elseif (fastly.error) {
error503;
}

States

ValueDescription
EBADDECRYPTDecryption failed. Produced when the wrong key or IV are used.
EPARSENUMNumber parsing failed. Claimed to be produced bystd.strtol but currently not possible.
ERANGENumerical result out of range.
EREGCall to regex routine failed (generic).
EREGRECURCall to regex routine failed because of recursion limits.
EREGSUBCall to regex routine failed (generic).
ESESOOMOut of workspace memory.
EDOMDomain error. This occurs for a mathematical function which is not defined for a particular value; formally, that value is not considered part of its inputdomain. For example, division by zero, orvar.x %= 5; wherevar.x is a floating point infinity.
ESYNTHOOMSynthetic response overflow.
EUTF8Invalid UTF-8.
EUNAVAILData temporarily unavailable.
EINVALInvalid argument.

[8]ページ先頭

©2009-2025 Movatter.jp