oRPC Customizing Error Response

Installation
SKILL.md

Customizing Error Response Format

By default, OpenAPIHandler, OpenAPIGenerator, and OpenAPILink share the same error response format. You can customize one, some, or all of them.

OpenAPIHandler

Use customErrorResponseBodyEncoder:

const handler = new OpenAPIHandler(router, {
  customErrorResponseBodyEncoder(error) {
    return error.toJSON()
  },
})

Return null or undefined to fallback to the default behavior.

OpenAPIGenerator

Installs
First Seen
oRPC Customizing Error Response — ali-master/skills