diff options
| author | Elizabeth Hunt <me@liz.coffee> | 2025-12-14 22:10:34 -0800 |
|---|---|---|
| committer | Elizabeth Hunt <me@liz.coffee> | 2025-12-14 22:10:54 -0800 |
| commit | 594ce452693a71b501d3aff3f35ef3732c06c341 (patch) | |
| tree | fba9cb7137940b286318dc35a747b171e0013963 /lib/server | |
| parent | eeca787c81ac92e46a9375a0b1ce8baa29852b1a (diff) | |
| download | pengueno-594ce452693a71b501d3aff3f35ef3732c06c341.tar.gz pengueno-594ce452693a71b501d3aff3f35ef3732c06c341.zip | |
Fix 400's not having error in response
Diffstat (limited to 'lib/server')
| -rw-r--r-- | lib/server/response/pengueno.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/server/response/pengueno.ts b/lib/server/response/pengueno.ts index e15d3f1..e5cc690 100644 --- a/lib/server/response/pengueno.ts +++ b/lib/server/response/pengueno.ts @@ -76,6 +76,6 @@ export class JsonResponse extends PenguenoResponse { ); return; } - super(req, JSON.stringify(Math.floor(opts.status / 100) > 4 ? { error: e } : { ok: e }), opts); + super(req, JSON.stringify(opts.status >= 400 ? { error: e } : { ok: e }), opts); } } |
