Download the PHP package ufo-tech/rpc-exceptions without Composer
On this page you can find all versions of the php package ufo-tech/rpc-exceptions. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package rpc-exceptions
ufo-tech/rpc-exceptions
Exception package RPC server error codes
Problem
When a rpc call encounters an error, the Response Object MUST contain the error member with a value that is a Object with the following members:
-
code: A Number that indicates the error type that occurred. This MUST be an integer.
- message: A String providing a short description of the error. The message SHOULD be limited to a concise single sentence.
Code | Type error | Summary |
---|---|---|
-32700 | Parse error | Invalid JSON was received by the server |
-32600 | Invalid Request | The JSON sent is not a valid Request object. |
-32601 | Method not found | The method does not exist / is not available. |
-32602 | Invalid params | Invalid method parameter(s). |
-32603 | Internal error | Internal JSON-RPC error. |
-32500 | Application error | Runtime error on procedure. |
-32400 | System error | Logic error on application. |
-32401 | Security error | Token not found |
-32403 | Security error | Invalid token |
-32300 | Async error | Error transfer async data |
-32301 | Batch error | Error batch request |
-32000 | Server error | Reserved for implementation-defined server-errors. |
from -32001 to -32099 | Custom user exception | --- |
There are many error codes and identifying the error from the code can be a difficult task. This library will help you. You can easily get the exception object from the error code.
Code | Exception class |
---|---|
-32700 | RpcJsonParseException::class |
-32600 | RpcBadRequestException::class |
-32601 | RpcMethodNotFoundExceptionRpc::class |
-32602 | RpcBadParamException::class |
-32603 | RpcInternalException::class |
-32500 | RpcRuntimeException::class |
-32400 | RpcLogicException::class |
-32401 | RpcTokenNotFoundInHeaderException::class |
-32403 | RpcInvalidTokenException::class |
-32300 | RpcAsyncRequestException::class |
-32301 | RpcInvalidBatchRequestExceptions::class |
-32000 | RpcDataNotFoundException::class |
from -32001 to -32099" | --- |
Installation
Get exception object
From code
From array
From json
Mapping list
Profit
All versions of rpc-exceptions with dependencies
PHP Build Version
Package Version
Requires
php Version
>=8.1
The package ufo-tech/rpc-exceptions contains the following files
Loading the files please wait ....