fix: update error handling to match new API (#7117)

This commit is contained in:
Ben McCann 2024-02-14 07:25:15 -08:00 committed by GitHub
parent 6adff50f0a
commit 2906950188
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 7 deletions

View file

@ -1,9 +1,9 @@
import type { ApiError } from '$lib/utils';
import axios from 'axios';
import { notificationController, NotificationType } from '../components/shared-components/notification/notification';
import type { HttpError } from '@sveltejs/kit';
export async function getServerErrorMessage(error: unknown) {
let data = (error as ApiError)?.response?.data;
let data = (error as HttpError)?.body;
if (data instanceof Blob) {
const response = await data.text();
try {