mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-02-27 04:06:39 +00:00
Moved logic to parse API errors to a helper function
This commit is contained in:
4
src/api/util.ts
Normal file
4
src/api/util.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
import { AxiosError } from 'axios';
|
||||
import { ProblemDetailsError } from '../utils/services/types';
|
||||
|
||||
export const parseApiError = (e: AxiosError<ProblemDetailsError>) => e.response?.data;
|
||||
Reference in New Issue
Block a user