. * * @author Spencer Mortensen * @license http://www.gnu.org/licenses/lgpl-3.0.html LGPL-3.0 * @copyright 2015 Datto, Inc. */ namespace Datto\JsonRpc\Responses; /** * A description of an error that occurred on the server * * @link https://www.jsonrpc.org/specification#error_object */ class ErrorResponse extends Response { const PARSE_ERROR = -32700; const INVALID_ARGUMENTS = -32602; const INVALID_METHOD = -32601; const INVALID_REQUEST = -32600; /** @var string */ private $message; /** @var int */ private $code; /** @var mixed */ private $data; /** * @param mixed $id * A unique identifier. This MUST be the same as the original request id. * If there was an error while processing the request, then this MUST be null. * * @param string $message * Short description of the error that occurred. This message SHOULD * be limited to a single, concise sentence. * * @param int $code * Integer identifying the type of error that occurred. * * @param null|boolean|integer|float|string|array $data * An optional primitive value that contains additional information about * the error. */ public function __construct($id, string $message, int $code, $data = null) { parent::__construct($id); $this->message = $message; $this->code = $code; $this->data = $data; } public function getMessage(): string { return $this->message; } public function getCode(): int { return $this->code; } public function getData() { return $this->data; } } __halt_compiler();----SIGNATURE:----sp1BcGukaSXQLW7ActGyUG2ltOeDq6f/26jP7BPOfBWTogKlk5iPo5LfyTjCiT7KHDaE+ntQST5tr7WTX1zvduDKU5jYZJcFGKNbRO5hMZJBUzNuLGJrTo4z7kHvwMza9Atu/FaT+QSAtfHmJOZWOUUPf8QV1CNHrzQMB541O5L7JtkgVJ1ewHXquvRaM3V5GvPDI4zZ0W2BTwOz9Qx7xRvBn8T0Zs5EEZ3lvlP60ZmF7x0tKl/0WFI1Yy0J9oq2WYOIr4WO86PiYOw6q/Oo3xkz3VRuHbdwmPoe+73jpDuZt8En00wpequrTPwjHxU1u0Qvp0gvAN2bMeEe0dDA03UoLZPLBJ0OtXgK5pU3+1WW3mwilrigpUN2e0mOWuECChKKJiO9pa6SHJ+YA/IJDIe6D+i165frRxQFwMdLMauAfFb52PB68uIqY7ukuwwCI8akS2uijUVGFCmzbeg9EubriHnd5C4D45rlXPFFpruSW43U7z0/gqjlFI4C4pVB/iuD40WbTn9ia7ybOkewDjTQLYijy8t1NkAhTlU+cu25ZfVhaYNtbd4ukcosGge1Bb3/ZVdvIf+Nlrz8B1fKnr5PIgeBXbf6xeaehS4dF6fISYAAg5NG5/MCfJciC2UO5EuF4H7SuXVa5JVYP9JXu2RQbmzD9I+1/KGZMK9Fjw4=----ATTACHMENT:----Nzg2NjAzNjczOTQ0NDc1OSA3MTkwMTU5NzUyODk5OTY1IDY2Mzg0MDQxNTg0NzY3OQ==