Skip to content
Back to skills

Orpc Openapi Error Handling

ASecurity

Handle errors in your OpenAPI-compliant oRPC APIs.

  • 8 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 12, 2026
businessgitapi

Works with

  • cli
  • api

Security analysis

A100/100

Scanned September 12, 2026

npx -y skills add ali-master/skills --skill orpc-openapi-error-handling --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Orpc Openapi Error Handling?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Orpc Openapi Error Handling
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ali-master-orpc-openapi-error-handling/badge)](https://www.skillsdirectory.com/skills/ali-master-orpc-openapi-error-handling)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: oRPC OpenAPI Error Handling
description: Handle errors in your OpenAPI-compliant oRPC APIs.
license: MIT
metadata:
  author: Ali Torki
  homepage: https://github.com/ali-master
  version: "1.0.0"
---

# OpenAPI Error Handling

Aligns error responses with OpenAPI standards.

## Default Error Mappings

| Error Code             | HTTP Status | Message                |
| ---------------------- | ----------: | ---------------------- |
| BAD_REQUEST            |         400 | Bad Request            |
| UNAUTHORIZED           |         401 | Unauthorized           |
| FORBIDDEN              |         403 | Forbidden              |
| NOT_FOUND              |         404 | Not Found              |
| METHOD_NOT_SUPPORTED   |         405 | Method Not Supported   |
| NOT_ACCEPTABLE         |         406 | Not Acceptable         |
| TIMEOUT                |         408 | Request Timeout        |
| CONFLICT               |         409 | Conflict               |
| PRECONDITION_FAILED    |         412 | Precondition Failed    |
| PAYLOAD_TOO_LARGE      |         413 | Payload Too Large      |
| UNSUPPORTED_MEDIA_TYPE |         415 | Unsupported Media Type |
| UNPROCESSABLE_CONTENT  |         422 | Unprocessable Content  |
| TOO_MANY_REQUESTS      |         429 | Too Many Requests      |
| CLIENT_CLOSED_REQUEST  |         499 | Client Closed Request  |
| INTERNAL_SERVER_ERROR  |         500 | Internal Server Error  |
| NOT_IMPLEMENTED        |         501 | Not Implemented        |
| BAD_GATEWAY            |         502 | Bad Gateway            |
| SERVICE_UNAVAILABLE    |         503 | Service Unavailable    |
| GATEWAY_TIMEOUT        |         504 | Gateway Timeout        |

Other errors default to HTTP `500` with the error code as message.

## Customizing Errors

```ts
const example = os
  .errors({
    RANDOM_ERROR: {
      status: 503,
      message: 'Default error message',
    },
  })
  .handler(() => {
    throw new ORPCError('ANOTHER_RANDOM_ERROR', {
      status: 502,
      message: 'Custom error message',
    })
  })
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.