mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
refactor(api): ♻️ Throw ApiError instead of returning error JSON
This commit is contained in:
parent
c14621ee06
commit
fbfd237f27
88 changed files with 458 additions and 483 deletions
|
|
@ -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://"),
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue