This is the source code from "JsonRpc/Message/ErrorResponse.php".
However, the JSON-RPC specification allows any integer. See (http://www.jsonrpc.org/specification) which says: "5.1 Error object -> code -> A Number that indicates the error type that occurred. This MUST be an integer."
That's all. After that a few reserved codes for pre-defined errors are listed. It seems that you've misinterpreted those reserved codes as the only one which are accepted. While actually, those reserved codes should be used as specified and "the remainder of the space is available for application defined errors."
Please allow us to use arbitrary integer error codes in our applications.
The current implementation accepts only the following error codes:
array_merge(array(-32700), range(-32600, -32603), range(-32000, -32099))
This is the source code from "JsonRpc/Message/ErrorResponse.php".
However, the JSON-RPC specification allows any integer. See (http://www.jsonrpc.org/specification) which says: "5.1 Error object -> code -> A Number that indicates the error type that occurred. This MUST be an integer."
That's all. After that a few reserved codes for pre-defined errors are listed. It seems that you've misinterpreted those reserved codes as the only one which are accepted. While actually, those reserved codes should be used as specified and "the remainder of the space is available for application defined errors."
Please allow us to use arbitrary integer error codes in our applications.