Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Resource Provider Guidance Needed for Capacity Exhaustion and Capacity-Constrained Responses

Open
#595 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Domain
api, documentation

Research direction

The issue is about adding guidance to the ARM/RP contract. Start by reviewing the existing Microsoft REST API Guidelines, particularly sections on error handling and HTTP status codes. Look for existing documentation on error codes like 'Throttled' or 'InternalServerError' to understand the current structure. 'Done' means the proposed guidance is integrated into the guidelines, with clear examples for the new error codes and the x-ms-failure-cause mapping.

Written by the indexing model from the issue text.

Description

Description

The Azure ecosystem currently lacks clear, Azure-wide guidance for Resource Providers on how to surface capacity-related failures to customers.

Today, similar capacity constraints are exposed inconsistently across Azure using a mix of:

  • 400 BadRequest
  • 409 Conflict
  • 429 TooManyRequests
  • 500 InternalServerError
  • RP-specific error codes and semantics

This inconsistency makes it difficult for customers, SDKs, ARM tooling, and dependent Azure services to reliably distinguish between:

  • Invalid requests that require customer action
  • Resource conflicts
  • Request throttling
  • Temporary service-side capacity shortages
  • Unexpected RP failures

Capacity exhaustion is fundamentally different from both a malformed request and an internal implementation error. A valid request may become satisfiable later without modification, yet there is currently no documented ARM / RP guidance defining the expected HTTP status code, error contract, retry semantics, or failure classification.

Proposal

Add explicit guidance to the ARM / RP contract for temporary capacity shortages.

Recommended response:

503 Service Unavailable
Retry-After: <optional>
x-ms-error-code: InsufficientCapacity
{
  "error": {
    "code": "InsufficientCapacity",
    "message": "The service currently has insufficient capacity to fulfill this request."
  }
}

Additionally, define a small set of canonical capacity-related error codes, for example:

  • InsufficientCapacity
  • RegionalCapacityExceeded
  • ZonalCapacityExceeded
  • SkuCapacityUnavailable
  • PlacementCapacityUnavailable

and document expected retry behavior for each.

x-ms-failure-cause Guidance

Provide explicit guidance for x-ms-failure-cause so capacity shortages can be distinguished from throttling and implementation defects.

Scenario HTTP Error Code x-ms-failure-cause
Temporary capacity shortage 503 InsufficientCapacity service
RP throttling 429 Throttled service
ARM throttling 429 TooManyRequests gateway
Unexpected RP failure 500 InternalServerError service

This would allow Azure services and customers to handle capacity conditions consistently across Resource Providers while improving diagnostics, automation, and customer experience.

Dominant language
No language data
Stars
23.3k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/api-guidelines

All issues in microsoft/api-guidelines

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.