mirror of
https://github.com/Routstr/routstrd.git
synced 2026-10-05 12:28:23 +00:00
test(http): preserve wallet error response status
This commit is contained in:
@@ -269,3 +269,14 @@ describe("POST /providers/nostr-sync", () => {
|
||||
expect(res.status).toBe(400);
|
||||
});
|
||||
});
|
||||
|
||||
describe("wallet errors", () => {
|
||||
it("maps a WalletHttpError onto its HTTP status", async () => {
|
||||
const handler = createDaemonRequestHandler({
|
||||
walletClient: { getMintQuote: async () => null },
|
||||
} as any);
|
||||
const res = await call(handler, "GET", "/wallet/receive/bolt11/missing");
|
||||
expect(res.status).toBe(404);
|
||||
expect(res.json()).toEqual({ error: "Mint quote not found" });
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user