diff --git a/site/src/api/api.ts b/site/src/api/api.ts index c550cdecde..f866544ea4 100644 --- a/site/src/api/api.ts +++ b/site/src/api/api.ts @@ -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