mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-01-28 01:29:07 +03:00
Merge remote-tracking branch 'origin/v3.4' into dev
This commit is contained in:
4
interface/src/utils/endpoints.ts
Normal file
4
interface/src/utils/endpoints.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
import { AxiosError } from 'axios';
|
||||
|
||||
export const extractErrorMessage = (error: AxiosError, defaultMessage: string) =>
|
||||
(error.response && error.response.data ? error.response.data.message : error.message) || defaultMessage;
|
||||
Reference in New Issue
Block a user