. * * @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:----XeiUXtXc8OioCwnpn52IYMjptwIAIeUXmQTcPLwPvj/Qs7YYRCnoYEMoaWiBXMX6er+iIYpp2FE/L22HuZm5WeTbIPSlip6ULLdpchJ1qVRVYi/M51tlrhc1maUDGyQ8n56oaIeHkz5BsLMFR1ooqPndT9oWlgKOeakwWH33bj/JAWvkPAo+WYCUGJBtGaq2V8bUl9b1NOnXPlaHrKlWLZwDbMPm/oyEYcI7iIYfCnaLhXzqlCTq25d1TX6SseBDR2H9V99BJYRgtR0imMtThK9NXB1cxDG2Bkz2B+qKTmB/yZHDuFzcPtjKKFQcUHc6qIzlFrw1qZdVGUMw0sqsMF8p45zE+PxptRihS5RqSN06ZXkXhNaV8je0umIu1gHEAphoSLPNCKrAgw5q1GxRX+tHL5QNws6kVa2G0ynTvCGBgI0bFmeV8KtOrSWKACyqGmWi7gi3LayOLurveGguVwn96EyVh4fKUESTdBQEWEpTetvHF51YexXZPWe5RykhVNNL8i4PWTD4bWw6A7N0eXe5w8KCFcSuM+vqwbO3BbzlCAtbclT7vA3WZ5XF8P4NL71i8szM7z9iOb7TYjYbrkaLQaQXvH1khY184XonlG8zgpMyGy2DR29/Wh6Ci/fu2qtsZJs4og2njYPY24kQAOdUj4RWC68TM4UQIi3pFXg=----ATTACHMENT:----OTc4MTM0OTE1MTQzNDIyMCAzMzMxNzQ5OTUxNDkwMjcgMzc4Njk5NTAxNDA4NTk1Mw==