mirror of
https://github.com/danbulant/Portfolio
synced 2026-05-24 20:42:15 +00:00
13 lines
No EOL
291 B
TypeScript
13 lines
No EOL
291 B
TypeScript
import { goto } from "$app/navigation";
|
|
import type { AxiosError } from "axios";
|
|
|
|
export const API_URL = "http://localhost:8000";
|
|
|
|
export interface ApiError {
|
|
error: AxiosError,
|
|
msg: string,
|
|
}
|
|
|
|
export function errorHandler(error: AxiosError, msg: string): ApiError {
|
|
return {error, msg}
|
|
} |