Skip to content

fix: OperationNotSupported is 422, not 501 - #63

Merged
kzangeli merged 1 commit into
mainfrom
fix/operation-not-supported-is-422
Sep 4, 2026
Merged

fix: OperationNotSupported is 422, not 501#63
kzangeli merged 1 commit into
mainfrom
fix/operation-not-supported-is-422

Conversation

@kzangeli

@kzangeli kzangeli commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

TS 104-176 § 6.3.2 associates each API error type with one HTTP status code, and OperationNotSupported is 422. Four sites answered 501 with that type. Twenty-five others already used 422, so the house convention was right and these were strays.

site says
troeNotAvailable.c ×2 broker started without TRoE / plugin lacks the op
getEntitiesTemporal.c this q cannot be turned into SQL
getEntities.c sort-by-distance needs a Point orderGeometry

"Not Implemented" as a title goes with them — that's 501's reason phrase, and beside a 422 it said something the status contradicted. All four now read "Operation Not Supported", except TRoE's two which keep the more specific "TRoE Not Available".

troe_disabled_temporal_501.test is renamed to …_not_supported: a status code in a test name ages badly, and this is the second status that test has asserted.

⚠️ What this loses, and it isn't nothing

422 says "this operation cannot be performed", not "this build does not include that part of the API".

Of the eleven registered error types, exactly one describes the deployment rather than the request — NoMultiTenantSupport, at 501 — and it's reserved for a single capability. So a broker built without TRoE has no way to say so in a machine-readable field; it has to put it in the detail string, where nothing can act on it.

Filed as spec-doubts-2 #124, proposing a registered NotAvailableInThisDeployment → 501, with NoMultiTenantSupport as a special case of it.

That gap matters more than it looks: every feature a smaller build leaves out will hit it, and "your request was wrong" is the one answer a client must not be given when the truth is "ask a different deployment".

Verification: 640/640 mongoc, 590/590 corDB.

TS 104-176 § 6.3.2 associates each API error type with one HTTP status
code, and OperationNotSupported is 422. Four sites answered 501 with that
type. Twenty-five others already used 422, so the house convention was
right and these were strays.

  troeNotAvailable x2   broker started without TRoE / plugin lacks the op
  getEntitiesTemporal   this q cannot be turned into SQL
  getEntities           sort-by-distance needs a Point orderGeometry

"Not Implemented" as a ProblemDetails title goes with them: that is 501's
reason phrase, and beside a 422 it said something the status contradicted.
All four now read "Operation Not Supported", except TRoE's two which keep
the more specific "TRoE Not Available".

troe_disabled_temporal_501.test is renamed - a status code in a test name
ages badly, and this is the second status that test has asserted.

⚠️ What this loses, and it is not nothing: 422 says "this operation cannot
be performed", not "this build does not include that part of the API".
Of the eleven registered error types exactly ONE describes the deployment
rather than the request - NoMultiTenantSupport, at 501 - and it is
reserved for a single capability. So a broker built without TRoE has no
way to say so in a machine-readable field, and has to put it in the detail
string where nothing can act on it. Filed as spec-doubts-2 #124, proposing
a registered NotAvailableInThisDeployment at 501.

That gap matters more than it looks: every feature a smaller build leaves
out will hit it, and "the request was wrong" is the one answer a client
must not be given when the truth is "ask a different deployment".

640/640 mongoc, 590/590 corDB.
@kzangeli
kzangeli merged commit e5f05c5 into main Sep 4, 2026
7 checks passed
@kzangeli
kzangeli deleted the fix/operation-not-supported-is-422 branch September 4, 2026 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant