taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit eed630db1b502d5433bf5235e234fe488b10dfbf
parent 2a452cf295fb2f9368ef9ea76be72ca6c371fc1e
Author: Florian Dold <dold@taler.net>
Date:   Tue, 21 Jul 2026 03:05:24 +0200

util: accept 201 Created when preparing a donau receipt

POST /csr-issue documents 201 as its only success code, but the client matched
200, so the happy path never succeeded. Match 201, drop the 410 Gone case copied
from batch-issue, and add the documented 400 and 503 failures.

Diffstat:
Mpackages/taler-util/src/http-client/donau-client.ts | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/packages/taler-util/src/http-client/donau-client.ts b/packages/taler-util/src/http-client/donau-client.ts @@ -154,11 +154,13 @@ export class DonauHttpClient { body, }); switch (resp.status) { - case HttpStatusCode.Ok: + case HttpStatusCode.Created: return opSuccessFromHttp(resp, codecForIssuePrepareResponse()); + case HttpStatusCode.BadRequest: + return opKnownFailure(resp, resp.status); case HttpStatusCode.NotFound: return opKnownFailure(resp, resp.status); - case HttpStatusCode.Gone: + case HttpStatusCode.ServiceUnavailable: return opKnownFailure(resp, resp.status); default: return opUnknownHttpFailure(resp);