mirror of
https://github.com/portainer/portainer.git
synced 2025-08-06 06:15:22 +02:00
chore(deps): upgrade axios [EE-6488] (#10885)
Co-authored-by: Matt Hook <hookenz@gmail.com>
This commit is contained in:
parent
4c226d7a17
commit
a1519ba737
14 changed files with 116 additions and 57 deletions
|
@ -1,7 +1,10 @@
|
|||
import { AxiosError } from 'axios';
|
||||
import { useQuery } from 'react-query';
|
||||
|
||||
import axios, { parseAxiosError } from '@/portainer/services/axios';
|
||||
import axios, {
|
||||
isDefaultResponse,
|
||||
parseAxiosError,
|
||||
} from '@/portainer/services/axios';
|
||||
|
||||
interface Creds {
|
||||
username?: string;
|
||||
|
@ -45,8 +48,10 @@ export async function checkRepo(
|
|||
);
|
||||
return true;
|
||||
} catch (error) {
|
||||
throw parseAxiosError(error as Error, '', (axiosError: AxiosError) => {
|
||||
let details = axiosError.response?.data.details;
|
||||
throw parseAxiosError(error, '', (axiosError: AxiosError) => {
|
||||
let details = isDefaultResponse(axiosError.response?.data)
|
||||
? axiosError.response?.data.details || ''
|
||||
: '';
|
||||
|
||||
const { creds = {} } = options;
|
||||
// If no credentials were provided alter error from git to indicate repository is not found or is private
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue