refactor(api): ♻️ Throw ApiError instead of returning error JSON

This commit is contained in:
Jesse Wierzbinski 2024-12-30 18:00:23 +01:00
parent c14621ee06
commit fbfd237f27
No known key found for this signature in database
88 changed files with 458 additions and 483 deletions

View file

@ -25,7 +25,7 @@ describe("API Tests", () => {
const data = await response.json();
expect(data.error).toBeString();
expect(data.error).toContain("https://stackoverflow.com");
expect(data.details).toContain("https://stackoverflow.com");
});
// Now automatically mitigated by the server
@ -35,7 +35,7 @@ describe("API Tests", () => {
}
const response = await fakeRequest(
"/api/v1/instance",
base_url.replace("https://", "http://"),
),