mirror of https://github.com/portainer/portainer
13 lines
275 B
TypeScript
13 lines
275 B
TypeScript
|
import { AxiosError } from 'axios';
|
||
|
|
||
|
export function azureErrorParser(axiosError: AxiosError) {
|
||
|
const message =
|
||
|
(axiosError.response?.data?.error?.message as string) ||
|
||
|
'Failed azure request';
|
||
|
|
||
|
return {
|
||
|
error: new Error(message),
|
||
|
details: message,
|
||
|
};
|
||
|
}
|