MCPcopy
hub / github.com/fosrl/pangolin / formatAxiosError

Function formatAxiosError

src/lib/api/formatAxiosError.ts:1–8  ·  view source on GitHub ↗
(error: any, defaultMessage?: string)

Source from the content-addressed store, hash-verified

1export function formatAxiosError(error: any, defaultMessage?: string): string {
2 return (
3 error.response?.data?.message ||
4 error?.message ||
5 defaultMessage ||
6 "An error occurred"
7 );
8}

Callers 15

removeUserFunction · 0.90
deleteLabelFunction · 0.90
deleteIdpFunction · 0.90
importIdpFunction · 0.90
unassociateIdpFunction · 0.90
deleteSharelinkFunction · 0.90
onSubmitFunction · 0.90
deleteSiteFunction · 0.90
onSubmitFunction · 0.90
deleteInternalResourceFunction · 0.90
handleSubmitFunction · 0.90
deleteSiteFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected