MCPcopy Create free account
hub / github.com/XeroAPI/xero-mcp-server / formatHttpStatus

Function formatHttpStatus

src/helpers/format-error.ts:27–40  ·  view source on GitHub ↗
(status: number)

Source from the content-addressed store, hash-verified

25}
26
27function formatHttpStatus(status: number): string {
28 switch (status) {
29 case 401:
30 return "Authentication failed. Please check your Xero credentials.";
31 case 403:
32 return "You don't have permission to access this resource in Xero.";
33 case 404:
34 return "The requested resource was not found in Xero.";
35 case 429:
36 return "Too many requests to Xero. Please try again in a moment.";
37 default:
38 return "";
39 }
40}
41
42/**
43 * Format error messages for return to the LLM.

Callers 1

formatErrorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected