PHPackages                             ufo-tech/rpc-exceptions - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. ufo-tech/rpc-exceptions

ActiveLibrary[API Development](/categories/api)

ufo-tech/rpc-exceptions
=======================

Exception package RPC server error codes

1.3.1(10mo ago)164.2k↓41.7%4MITPHPPHP &gt;=8.4

Since May 10Pushed 10mo ago1 watchersCompare

[ Source](https://github.com/UFO-Tech/rpc-exceptions)[ Packagist](https://packagist.org/packages/ufo-tech/rpc-exceptions)[ Docs](https://github.com/ufo-tech/rpc-exceptions)[ RSS](/packages/ufo-tech-rpc-exceptions/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (7)Used By (4)

ufo-tech/rpc-exceptions
=======================

[](#ufo-techrpc-exceptions)

### Exception package RPC server error codes

[](#exception-package-rpc-server-error-codes)

[![Ukraine](https://camo.githubusercontent.com/1bdf379c1ec9fb38773a34b39770476d6afc11a6414cf9b220f7ac744eb4c693/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2544302541312544302542422544302542302544302542322544302542302d2544302541332544302542412544312538302544302542302544312539372544302542442544312539362d79656c6c6f773f6c6162656c436f6c6f723d626c7565)](https://camo.githubusercontent.com/1bdf379c1ec9fb38773a34b39770476d6afc11a6414cf9b220f7ac744eb4c693/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2544302541312544302542422544302542302544302542322544302542302d2544302541332544302542412544312538302544302542302544312539372544302542442544312539362d79656c6c6f773f6c6162656c436f6c6f723d626c7565)

[![License](https://camo.githubusercontent.com/5f10cda952d684cb9142391c760fff757740755bff79ec52769d1650f80165bb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e3f6c6162656c436f6c6f723d376238313835)](https://camo.githubusercontent.com/5f10cda952d684cb9142391c760fff757740755bff79ec52769d1650f80165bb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e3f6c6162656c436f6c6f723d376238313835) [![Size](https://camo.githubusercontent.com/eba0c25af0f883ba6ef414639c6d5e52c28a747372376f88c21302dcada89f3d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7265706f2d73697a652f75666f2d746563682f7270632d657863657074696f6e733f6c6162656c3d53697a652532306f662532307468652532307265706f7369746f7279)](https://camo.githubusercontent.com/eba0c25af0f883ba6ef414639c6d5e52c28a747372376f88c21302dcada89f3d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7265706f2d73697a652f75666f2d746563682f7270632d657863657074696f6e733f6c6162656c3d53697a652532306f662532307468652532307265706f7369746f7279) [![package_version](https://camo.githubusercontent.com/83714625f25b8d065fa787b1c1fc916051ec8198f48de1e0c33d2bfacdb2326e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f75666f2d746563682f7270632d657863657074696f6e733f636f6c6f723d626c7565266c6162656c3d4c617465737425323056657273696f6e266c6f676f3d5061636b6167697374266c6f676f436f6c6f723d7768697465266c6162656c436f6c6f723d376238313835)](https://camo.githubusercontent.com/83714625f25b8d065fa787b1c1fc916051ec8198f48de1e0c33d2bfacdb2326e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f75666f2d746563682f7270632d657863657074696f6e733f636f6c6f723d626c7565266c6162656c3d4c617465737425323056657273696f6e266c6f676f3d5061636b6167697374266c6f676f436f6c6f723d7768697465266c6162656c436f6c6f723d376238313835) [![fork](https://camo.githubusercontent.com/17cd5be0eca4fa99456702a070edb17efb43871b0821ac68081c00a8a7e05e15/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f75666f2d746563682f7270632d657863657074696f6e733f636f6c6f723d677265656e266c6f676f3d676974687562267374796c653d666c6174)](https://camo.githubusercontent.com/17cd5be0eca4fa99456702a070edb17efb43871b0821ac68081c00a8a7e05e15/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f75666f2d746563682f7270632d657863657074696f6e733f636f6c6f723d677265656e266c6f676f3d676974687562267374796c653d666c6174)[![php_version](https://camo.githubusercontent.com/7c8a8f2ea6de5ff49d0a58fd54d2eab8d8e63ede3532fcb9d07a5b6dd38d77d3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f75666f2d746563682f7270632d657863657074696f6e732f7068703f6c6f676f3d504850266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/7c8a8f2ea6de5ff49d0a58fd54d2eab8d8e63ede3532fcb9d07a5b6dd38d77d3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f75666f2d746563682f7270632d657863657074696f6e732f7068703f6c6f676f3d504850266c6f676f436f6c6f723d7768697465)

Problem
-------

[](#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.

CodeType errorSummary-32700Parse errorInvalid JSON was received by the server-32600Invalid RequestThe JSON sent is not a valid Request object.-32601Method not foundThe method does not exist / is not available.-32602Invalid paramsInvalid method parameter(s).-32603Internal errorInternal JSON-RPC error.-32500Server errorRuntime error on procedure.-32400System errorLogic error on application.-32401Security errorToken not found-32403Security errorInvalid token-32404Data errorRequested data not found-32300Async errorError transfer async data-32301Batch errorError batch request-32000Application errorReserved for implementation-defined server-errors.from -32001 to -32099Custom 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.

CodeException class-32700RpcJsonParseException::class-32600RpcBadRequestException::class-32601RpcMethodNotFoundExceptionRpc::class-32602RpcBadParamException::class-32603RpcInternalException::class-32500RpcRuntimeException::class-32400RpcLogicException::class-32401RpcTokenNotFoundInHeaderException::class-32403RpcInvalidTokenException::class-32404RpcDataNotFoundException::class-32300RpcAsyncRequestException::class-32301RpcInvalidBatchRequestExceptions::class-32000RpcCustomApplicationException::classfrom -32001 to -32099"---Installation
------------

[](#installation)

```
$ composer require ufo-tech/rpc-exceptions
```

Get exception object
--------------------

[](#get-exception-object)

### From code

[](#from-code)

```
use Ufo\RpcError\AbstractRpcErrorException;

$code = -32700;
$message = 'Some custom error message from rpc server'; // optional
$rpcException = AbstractRpcErrorException::fromCode($code);
// return instance of RpcJsonParseException::class
```

### From array

[](#from-array)

```
use Ufo\RpcError\AbstractRpcErrorException;

$data = [
    'code' = -32600,
    'message' = 'Some custom error message from rpc server',
];
$rpcException = RpcBadRequestException::fromArray($data);
// return instance of RpcBadRequestException::class
```

### From json

[](#from-json)

```
use Ufo\RpcError\AbstractRpcErrorException;

$data = "{\"code\":-32500,\"message\":\"Some custom error message from rpc server\"}";
$rpcException = AbstractRpcErrorException::fromArray($data);
// return instance of RpcRuntimeException::class
```

Mapping list
------------

[](#mapping-list)

```
use Ufo\RpcError\AbstractRpcErrorException;

$mapping = AbstractRpcErrorException::getRpcErrorsList();
// return array map
[
    -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,
    -32404 => RpcDataNotFoundException::class,
    -32300 => RpcAsyncRequestException::class,
    -32301 => RpcInvalidBatchRequestExceptions::class,
    -32000 => RpcCustomApplicationException::class,
]
```

Profit
------

[](#profit)

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance54

Moderate activity, may be stable

Popularity29

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 84.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~84 days

Recently: every ~26 days

Total

6

Last Release

314d ago

PHP version history (2 changes)1.0.4PHP &gt;=8.1

1.3.0PHP &gt;=8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/87aea0bcf81c64ced7c3a14a1746d603ec6e8acfba62ef85746df40e8c376e7f?d=identicon)[Alex Maistrenko](/maintainers/Alex%20Maistrenko)

---

Top Contributors

[![Ashterix](https://avatars.githubusercontent.com/u/5172394?v=4)](https://github.com/Ashterix "Ashterix (11 commits)")[![valiknik225](https://avatars.githubusercontent.com/u/137418080?v=4)](https://github.com/valiknik225 "valiknik225 (2 commits)")

---

Tags

apirpcerrorsjson-rpcUfo

### Embed Badge

![Health badge](/badges/ufo-tech-rpc-exceptions/health.svg)

```
[![Health](https://phpackages.com/badges/ufo-tech-rpc-exceptions/health.svg)](https://phpackages.com/packages/ufo-tech-rpc-exceptions)
```

###  Alternatives

[jsonrpc/jsonrpc

JSON-RPC 2.0 client/server implementation

53407.1k4](/packages/jsonrpc-jsonrpc)[tivoka/tivoka

The universal JSON-RPC client/server library. JSON-RPC done right!

74159.0k3](/packages/tivoka-tivoka)[ufo-tech/json-rpc-sdk-bundle

The Symfony bundle for simple usage Json-RPC api with dynamic SDK

172.5k](/packages/ufo-tech-json-rpc-sdk-bundle)[tbondois/odoo-ripcord

Ripoo : a PHP8 XML-RPC client handler for Odoo External API

16124.3k1](/packages/tbondois-odoo-ripcord)[nanofelis/json-rpc-bundle

This bundle provides a JSON RPC 2.0 implementation for Symfony

1176.1k](/packages/nanofelis-json-rpc-bundle)[ufo-tech/json-rpc-client-sdk

Simple clientSDK builder for any json-RPC servers

182.7k1](/packages/ufo-tech-json-rpc-client-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
