Skip to content

Feedback on formalising the error codes #2209

Description

@Agent-Hellboy

I have been reading the new SEP and seeing error code getting chosen out of nowhere, but shouldn't a protocol formalise this, even projects like postgres do this.

A workable formal classing scheme (within -32000..-32099)
Because we only have 100 slots, the most practical structure is two digits:

  • -32 C R → C = class (0–9), R = reason (0–9)
  • Example: -32042 → class 4, reason 2

Suggested class map (example):

  • 0x: General / common
  • 1x: Auth / access
  • 2x: Not found / missing
  • 3x: Validation / state
  • 4x: Interaction / elicitation
  • 5x: Rate limit / quota
  • 6x: Transport / upstream
  • 7x: Capability / negotiation
  • 8x: Data integrity / tamper
  • 9x: Reserved / experimental

it will also help people reason about the error and it's impact , although all error code has same client impact.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions