Skip to content
error-handling-reviewer logo

Error Handling Test Case Reviewer

error-handling-reviewer

Review test cases for OAuth/OIDC error handling. Covers authorization endpoint errors, token endpoint errors, error response formats, HTTP status codes, and all error codes per OAuth 2.1 and OIDC Core 1.0.

SKILL.md

Full skill instructions

Error Handling Test Case Reviewer

Review test cases for error handling in OpenID Connect Basic OP.

Scope

  • Feature: Error Responses
  • Specifications: OAuth 2.1 Section 4.1.2.1, 5.2; OIDC Core 1.0 Section 3.1.2.6
  • Profile: Basic OP (Authorization Code Flow)

Review Process

  1. Identify which error scenario the test targets
  2. Check against the checklist below
  3. Verify correct error code is returned
  4. Ensure response format matches specification
  5. Report gaps with specific spec section references

Authorization Endpoint Errors

OAuth 2.1 Error Codes (Section 4.1.2.1)

Error CodeConditionSpec
invalid_requestMissing/​malformed parameter, duplicate parameterOAuth 2.1 4.1.2.1
unauthorized_clientClient not authorized for grant typeOAuth 2.1 4.1.2.1
access_deniedResource owner or AS denied requestOAuth 2.1 4.1.2.1
unsupported_response_typeresponse_type not supportedOAuth 2.1 4.1.2.1
invalid_scopeInvalid, unknown, or malformed scopeOAuth 2.1 4.1.2.1
server_errorUnexpected condition (use sparingly)OAuth 2.1 4.1.2.1
temporarily_unavailableServer temporarily overloadedOAuth 2.1 4.1.2.1

OIDC-Specific Error Codes (Section 3.1.2.6)

Error CodeConditionSpec
interaction_requiredprompt=none but End-User interaction neededOIDC Core 3.1.2.6
login_requiredprompt=none but End-User not authenticatedOIDC Core 3.1.2.6
account_selection_requiredprompt=none but account selection neededOIDC Core 3.1.2.6
consent_requiredprompt=none but consent requiredOIDC Core 3.1.2.6
invalid_request_urirequest_uri invalid or unreachableOIDC Core 3.1.2.6
invalid_request_objectRequest Object invalidOIDC Core 3.1.2.6
request_not_supportedOP doesn't support request parameterOIDC Core 3.1.2.6
request_uri_not_supportedOP doesn't support request_uri parameterOIDC Core 3.1.2.6
registration_not_supportedOP doesn't support registration parameterOIDC Core 3.1.2.6

Authorization Error Response Format

For Authorization Code flow, errors returned in query component:

HTTP/​1.1 302 Found
Location: https://client.example.org/​cb?
  error=invalid_request
  &error_description=Unsupported%20response_type%20value
  &state=af0ifjsldkj

Token Endpoint Errors

OAuth 2.1 Error Codes (Section 5.2)

Error CodeConditionSpec
invalid_requestMissing/​malformed parameterOAuth 2.1 5.2
invalid_clientClient authentication failedOAuth 2.1 5.2
invalid_grantInvalid/​expired code, redirect_uri mismatch, PKCE failureOAuth 2.1 5.2
unauthorized_clientClient not authorized for grant typeOAuth 2.1 5.2
unsupported_grant_typegrant_type not supportedOAuth 2.1 5.2
invalid_scopeRequested scope exceeds grantOAuth 2.1 5.2

Token Error Response Format

Errors returned as JSON with HTTP 400 (or 401 for invalid_client):

HTTP/​1.1 400 Bad Request
Content-Type: application/​json;charset=UTF-8
Cache-Control: no-store

{
  "error": "invalid_grant",
  "error_description": "Authorization code expired"
}

HTTP Status Codes

ErrorHTTP Status
invalid_client401 (if via Authorization header) or 400
All others400

Error Response Parameters

ParameterRequiredDescription
errorREQUIREDASCII error code
error_descriptionOPTIONALHuman-readable description (ASCII)
error_uriOPTIONALURI with error information
stateREQUIRED if in requestExact value from request

Test Cases Checklist

Missing Required Parameters

ScenarioExpected ErrorEndpoint
[ ] Missing response_typeinvalid_requestAuthorization
[ ] Missing client_idinvalid_requestAuthorization
[ ] Missing scopeinvalid_requestAuthorization
[ ] Missing openid in scopeinvalid_scopeAuthorization
[ ] Missing grant_typeinvalid_requestToken
[ ] Missing codeinvalid_requestToken
[ ] Missing code_verifier (when required)invalid_grantToken

Invalid Parameters

ScenarioExpected ErrorEndpoint
[ ] Unknown response_typeunsupported_response_typeAuthorization
[ ] Unregistered redirect_uriinvalid_requestAuthorization
[ ] Invalid redirect_uri formatinvalid_requestAuthorization
[ ] Invalid client_idunauthorized_client or invalid_requestAuthorization
[ ] Invalid/​expired codeinvalid_grantToken
[ ] Code already usedinvalid_grantToken
[ ] PKCE verification failureinvalid_grantToken
[ ] Client authentication failureinvalid_clientToken

prompt=none Specific Errors

ScenarioExpected Error
[ ] User not authenticatedlogin_required
[ ] Consent not yet givenconsent_required
[ ] Multiple accounts, selection neededaccount_selection_required
[ ] Any interaction neededinteraction_required

Redirect URI Edge Cases

ScenarioExpected Behavior
[ ] Invalid/​unregistered redirect_uriMUST NOT redirect, display error
[ ] Valid redirect_uri but error occurredRedirect with error in query
[ ] Error with state in requestInclude state in error response

Error Response Validation Checklist

CheckRequirement
[ ] error parameter present
[ ] error value is valid code
[ ] state returned if sent
[ ] No redirect for invalid redirect_uri
[ ] Correct HTTP status code
[ ] JSON Content-Type for token endpoint
[ ] No caching headers (Cache-Control: no-store)

Conformance Test IDs

Test IDScenario
OP-Response-MissingMissing response_type → error
OP-redirect_uri-NotRegUnregistered redirect_uri → error
OP-OAuth-2ndReused code → error
OP-OAuth-2nd-30sCode reuse after 30s → error

Review Output Format

## Test Case: [Name]
### Target Feature: Error Handling - [specific scenario]
### Test ID: OP-Error-[xxx]
### Spec Compliance:
- [x] Covers required behavior per [spec section]
- [ ] Missing: [specific requirement]
### Error Response:
- [x/​blank] Correct error code
- [x/​blank] Correct HTTP status
- [x/​blank] state included if sent
### Verdict: PASS / FAIL / PARTIAL
### Recommendations: [if any]

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View