Skip to content

Commit

Permalink
Self-review
Browse files Browse the repository at this point in the history
  • Loading branch information
timomeh committed Feb 26, 2024
1 parent 553f637 commit e89bc08
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions testing/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,18 @@ export const handlers: HttpHandler[] = [

const body = await request.json()

// Simulate an API error by submitting accountNumber: 'MAGIC_FAIL'
if (body.accountNumber === 'MAGIC_FAIL') {
return HttpResponse.json(
{ message: 'Simulated error' },
{ status: 422 },
)
}

const newPrt = {
...prt,
...body,
}
const newPrt = { ...prt, ...body }

// The accountPin is not saved in the resource. When an accountPin is set,
// it sets the accountPinExists flag.
if (newPrt.accountPin) {
newPrt.accountPinExists = true
delete newPrt.accountPin
Expand Down

0 comments on commit e89bc08

Please sign in to comment.