httpStatusUserMessage top-level property

Map<int, String> get httpStatusUserMessage

A map of HTTP status codes to user-friendly messages.

This map provides easy-to-understand explanations of HTTP status codes that can be shown to end users in error messages and notifications.

Implementation

Map<int, String> get httpStatusUserMessage => const {
  // 1xx - Informational
  100: 'Please wait while we process your request...',
  101: 'Switching to a different protocol...',
  102: 'Your request is being processed...',
  103: 'Getting things ready...',

  // 2xx - Success
  200: 'Success! Everything worked as expected.',
  201:
      'Success! Your request has been completed and a new resource was created.',
  202: 'Your request has been accepted and is being processed.',
  203: 'Request successful, but some information might have been modified.',
  204: "The request was successful, but there's nothing to show.",
  205: 'Please refresh your page to see the changes.',
  206: 'Showing partial content as requested.',
  207: 'Multiple operations completed with different results.',
  208: 'This information was already reported earlier.',
  226:
      'Your request was successful and the response has been modified for efficiency.',

  // 3xx - Redirection
  300: 'Multiple options are available. Please choose one.',
  301: 'This page has been permanently moved to a new location.',
  302: 'This page has been temporarily moved to a different location.',
  303: 'Please check another page for the response to your request.',
  304: 'Nothing has changed since your last visit.',
  305: 'You need to use a proxy to access this resource.',
  306: 'This status code is unused.',
  307: 'This page is temporarily at a different address. Please try again.',
  308: 'This page has been permanently moved. Please update your bookmarks.',

  // 4xx - Client Errors
  400: 'Oops! There seems to be a problem with your request.',
  401: 'Please log in to access this content.',
  402: 'Payment is required to access this content.',
  403: "Sorry, you don't have permission to access this.",
  404: "Sorry, we couldn't find what you're looking for.",
  405: 'This type of request is not allowed here.',
  406: 'The requested format is not available.',
  407: 'Please authenticate with the proxy server first.',
  408: 'The request took too long. Please try again.',
  409: 'There was a conflict with your request. Please try again.',
  410: 'Sorry, this content has been permanently removed.',
  411: 'Please specify the length of the content in your request.',
  412: 'Some conditions for this request were not met.',
  413: "Sorry, the file you're trying to upload is too large.",
  414: 'The web address is too long. Please use a shorter URL.',
  415: 'This type of file is not supported.',
  416: 'The requested range of data is not available.',
  417: "Sorry, we couldn't meet the requirements for your request.",
  418: 'This server is actually a teapot! (Yes, this is a real error code!)',
  421: 'Your request was sent to the wrong server.',
  422: "We couldn't process your request due to invalid information.",
  423: 'The requested resource is currently locked.',
  424: 'This request failed because another related request failed.',
  425: 'Please try again later to prevent potential issues.',
  426: 'You need to upgrade your client to access this resource.',
  428: 'Some required conditions were not provided.',
  429: "Please slow down! You're making too many requests.",
  431: 'Your request headers are too large.',
  451: 'Sorry, this content is not available for legal reasons.',

  // 5xx - Server Errors
  500: 'Oops! Something went wrong on our end. Please try again later.',
  501: 'Sorry, this feature is not available yet.',
  502:
      "We're having trouble connecting to our servers. Please try again later.",
  503: 'Our service is temporarily unavailable. Please try again later.',
  504: 'The server took too long to respond. Please try again.',
  505: "Your browser's HTTP version is not supported.",
  506: 'We encountered an issue while negotiating content types.',
  507: "We've run out of storage space to complete your request.",
  508: 'We detected an infinite loop while processing your request.',
  510: 'The server needs additional extensions to fulfill this request.',
  511: 'Please authenticate with the network first.',
};