fix: importing api into vscode-coder (#12570)

This commit is contained in:
Asher
2024-03-13 10:05:44 -08:00
committed by GitHub
parent efba477b36
commit 0d16df9df9
+8 -3
View File
@@ -1,10 +1,15 @@
/**
* @fileoverview This file is imported externally by things like vscode-coder so
* it must not import anything using aliases otherwise it will break when being
* imported by those external consumers. For example, `utils/delay` must be
* imported using `../utils/delay` instead.
*/
import axios, { isAxiosError } from "axios";
import type dayjs from "dayjs";
import userAgentParser from "ua-parser-js";
import { delay } from "utils/delay";
import { delay } from "../utils/delay";
import * as TypesGen from "./typesGenerated";
// This needs to include the `../`, otherwise it breaks when importing into
// vscode-coder.
// Adds 304 for the default axios validateStatus function
// https://github.com/axios/axios#handling-errors Check status here