mirror of
https://github.com/alice-lg/alice-lg.git
synced 2024-05-11 05:55:03 +00:00
13 lines
228 B
React
13 lines
228 B
React
![]() |
|
||
|
/*
|
||
|
* Helper: Get info from api error
|
||
|
*/
|
||
|
|
||
|
export const infoFromError = function(error) {
|
||
|
if (error.response && error.response.data && error.response.data.code) {
|
||
|
return error.response.data;
|
||
|
}
|
||
|
return null;
|
||
|
}
|
||
|
|