git.99rst.org
/
sgasser-llm-shield.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
a88c104
)
Fix basic auth by using HTTPException.getResponse() (#63)
author
Stefan Gasser
<redacted>
Mon, 26 Jan 2026 10:02:18 +0000
(11:02 +0100)
committer
GitHub
<redacted>
Mon, 26 Jan 2026 10:02:18 +0000
(11:02 +0100)
src/index.ts
patch
|
blob
|
history
diff --git
a/src/index.ts
b/src/index.ts
index 2530a63628ed37a3300af898bf0b450104335ec1..e0035baa1c00564c32100df7ca1fdc885a0a798d 100644
(file)
--- a/
src/index.ts
+++ b/
src/index.ts
@@
-66,15
+66,7
@@
app.notFound((c) => {
app.onError((err, c) => {
if (err instanceof HTTPException) {
- return c.json(
- {
- error: {
- message: err.message,
- type: err.status >= 500 ? "server_error" : "client_error",
- },
- },
- err.status,
- );
+ return err.getResponse();
}
console.error("Unhandled error:", err);
git clone https://git.99rst.org/PROJECT