httpStatusDevMessage top-level property

Map<int, String> get httpStatusDevMessage

A map of HTTP status codes to detailed technical messages.

This map provides in-depth technical explanations of HTTP status codes intended for developers, including common causes and troubleshooting hints.

Implementation

Map<int, String> get httpStatusDevMessage => const {
  // 1xx - Informational
  100:
      'Client should continue with request. Server received request headers and client should proceed with body.',
  101: 'Server is switching protocols as requested by client Upgrade header.',
  102:
      'Server received and is processing request, but no response is available yet.',
  103:
      'Server is likely to send a final response with the headers included in this interim response.',

  // 2xx - Success
  200: 'Request successfully processed. Response includes payload.',
  201:
      'Resource successfully created. Response includes Location header or payload with resource URI.',
  202:
      'Request accepted for processing but not completed. Processing may occur asynchronously.',
  203:
      'Request processed via proxy that modified the underlying response data.',
  204:
      'Request processed successfully but response intentionally empty. Common for DELETE operations.',
  205:
      'Request processed. Client should reset document view. No response payload.',
  206: 'Partial content delivered as per Range header requirements.',
  207: 'Multi-Status response. Payload contains XML MultiStatus (WebDAV).',
  208:
      'DAV binding member already enumerated in previous part of (207) Multi-Status.',
  226: 'Server fulfilled GET request, response is delta encoding result.',

  // 3xx - Redirection
  300:
      'Multiple representations available. Respond to Accept header or provide choice.',
  301:
      'Resource permanently moved. Update all references to new Location header URI.',
  302: 'Resource temporarily moved. Maintain original URI for future requests.',
  303:
      'Response found at different URI. Use GET for redirect regardless of original method.',
  304: 'Resource not modified since timestamp or ETag in conditional request.',
  305:
      'Resource must be accessed through proxy in Location header (deprecated).',
  306: 'Status code unused per IANA.',
  307: 'Resource temporarily moved. Maintain method and payload for redirect.',
  308: 'Resource permanently moved. Maintain method and payload for redirect.',

  // 4xx - Client Errors
  400:
      'Malformed request syntax, invalid request message framing, or deceptive request routing.',
  401:
      'Request lacks valid authentication credentials. Check Authorization header.',
  402: 'Payment required. Reserved for future use. Check API documentation.',
  403:
      "Server understood request but refuses to authorize. Authentication won't help.",
  404: 'Resource not found at this location. Check URI path and method.',
  405:
      'HTTP method not allowed for resource. Check Allow header for valid methods.',
  406: 'Resource cannot generate response matching Accept headers.',
  407: 'Proxy authentication required. Check Proxy-Authenticate header.',
  408: 'Server timed out waiting for complete request from client.',
  409:
      'Request conflicts with current resource state. Common in PUT/POST/DELETE.',
  410: 'Resource permanently removed. Similar to 404 but more definitive.',
  411: 'Content-Length header required. Check request headers.',
  412:
      'Precondition in headers failed. Check If-Match/If-None-Match/If-Modified-Since.',
  413:
      'Request payload larger than server willing to process. Check Content-Length.',
  414: 'Request URI longer than server will interpret. Shorten URI.',
  415: 'Media type in Content-Type or Content-Encoding not supported.',
  416: 'Range header value invalid for resource. Check Content-Range.',
  417: 'Expectation in Expect header cannot be met by server.',
  418: 'Request refused - server is a teapot 🫖.',
  421:
      'Request directed to server unable to produce response. Check Host header.',
  422: 'Request well-formed but semantically invalid. Common in WebDAV.',
  423: 'Resource locked. Check WebDAV lock-token header.',
  424: 'Request failed due to failure of previous request (WebDAV).',
  425: 'Server unwilling to risk processing request that might be replayed.',
  426: 'Client should upgrade to required protocol. Check Upgrade header.',
  428: 'Precondition Required. Request should be conditional.',
  429: 'Too Many Requests. Check Rate-Limit headers and implement backoff.',
  431: 'Request header fields too large. Reduce header size.',
  451: 'Resource unavailable for legal reasons. May include explanation.',

  // 5xx - Server Errors
  500:
      'Server encountered unexpected condition preventing request fulfillment.',
  501: 'Server does not support functionality required to fulfill request.',
  502:
      'Invalid response received from upstream server while acting as gateway.',
  503:
      'Server temporarily unable to handle request due to overload or maintenance.',
  504: 'Gateway timeout waiting for response from upstream server.',
  505: 'HTTP version in request not supported by server.',
  506: 'Server has internal configuration error with content negotiation.',
  507: 'Server unable to store representation needed to complete request.',
  508: 'Server detected infinite loop while processing WebDAV request.',
  510: 'Further extensions to request required for server to fulfill it.',
  511: 'Client needs to authenticate to gain network access.',
};