@rebasepro/server-core 0.0.1-canary.f81da60 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/frontend/node_modules/esbuild/LICENSE.md +21 -0
- package/app/frontend/node_modules/esbuild/README.md +3 -0
- package/app/frontend/node_modules/esbuild/bin/esbuild +220 -0
- package/app/frontend/node_modules/esbuild/install.js +285 -0
- package/app/frontend/node_modules/esbuild/lib/main.d.ts +705 -0
- package/app/frontend/node_modules/esbuild/lib/main.js +2239 -0
- package/app/frontend/node_modules/esbuild/package.json +46 -0
- package/dist/index.es.js +140 -28
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +140 -28
- package/dist/index.umd.js.map +1 -1
- package/dist/server-core/src/auth/google-oauth.d.ts +33 -3
- package/dist/server-core/src/auth/index.d.ts +1 -0
- package/dist/server-core/src/init.d.ts +1 -0
- package/dist/types/src/controllers/auth.d.ts +8 -2
- package/dist/types/src/controllers/client.d.ts +13 -0
- package/dist/types/src/controllers/navigation.d.ts +18 -6
- package/dist/types/src/controllers/registry.d.ts +9 -1
- package/dist/types/src/controllers/side_entity_controller.d.ts +7 -0
- package/dist/types/src/rebase_context.d.ts +17 -0
- package/dist/types/src/types/collections.d.ts +20 -1
- package/dist/types/src/types/component_ref.d.ts +47 -0
- package/dist/types/src/types/entity_views.d.ts +2 -1
- package/dist/types/src/types/index.d.ts +1 -0
- package/dist/types/src/types/properties.d.ts +15 -3
- package/dist/types/src/types/translations.d.ts +2 -0
- package/examples/firebase/node_modules/esbuild/LICENSE.md +21 -0
- package/examples/firebase/node_modules/esbuild/README.md +3 -0
- package/examples/firebase/node_modules/esbuild/bin/esbuild +220 -0
- package/examples/firebase/node_modules/esbuild/install.js +285 -0
- package/examples/firebase/node_modules/esbuild/lib/main.d.ts +705 -0
- package/examples/firebase/node_modules/esbuild/lib/main.js +2239 -0
- package/examples/firebase/node_modules/esbuild/package.json +46 -0
- package/examples/medmot-staging/frontend/node_modules/esbuild/LICENSE.md +21 -0
- package/examples/medmot-staging/frontend/node_modules/esbuild/README.md +3 -0
- package/examples/medmot-staging/frontend/node_modules/esbuild/bin/esbuild +220 -0
- package/examples/medmot-staging/frontend/node_modules/esbuild/install.js +285 -0
- package/examples/medmot-staging/frontend/node_modules/esbuild/lib/main.d.ts +705 -0
- package/examples/medmot-staging/frontend/node_modules/esbuild/lib/main.js +2239 -0
- package/examples/medmot-staging/frontend/node_modules/esbuild/package.json +46 -0
- package/examples/sdk-demo/node_modules/esbuild/LICENSE.md +21 -0
- package/examples/sdk-demo/node_modules/esbuild/README.md +3 -0
- package/examples/sdk-demo/node_modules/esbuild/bin/esbuild +223 -0
- package/examples/sdk-demo/node_modules/esbuild/install.js +289 -0
- package/examples/sdk-demo/node_modules/esbuild/lib/main.d.ts +716 -0
- package/examples/sdk-demo/node_modules/esbuild/lib/main.js +2242 -0
- package/examples/sdk-demo/node_modules/esbuild/package.json +49 -0
- package/package.json +7 -7
- package/packages/client/node_modules/esbuild/LICENSE.md +21 -0
- package/packages/client/node_modules/esbuild/README.md +3 -0
- package/packages/client/node_modules/esbuild/bin/esbuild +220 -0
- package/packages/client/node_modules/esbuild/install.js +285 -0
- package/packages/client/node_modules/esbuild/lib/main.d.ts +705 -0
- package/packages/client/node_modules/esbuild/lib/main.js +2239 -0
- package/packages/client/node_modules/esbuild/package.json +46 -0
- package/packages/client-postgresql/node_modules/esbuild/LICENSE.md +21 -0
- package/packages/client-postgresql/node_modules/esbuild/README.md +3 -0
- package/packages/client-postgresql/node_modules/esbuild/bin/esbuild +220 -0
- package/packages/client-postgresql/node_modules/esbuild/install.js +285 -0
- package/packages/client-postgresql/node_modules/esbuild/lib/main.d.ts +705 -0
- package/packages/client-postgresql/node_modules/esbuild/lib/main.js +2239 -0
- package/packages/client-postgresql/node_modules/esbuild/package.json +46 -0
- package/packages/common/node_modules/esbuild/LICENSE.md +21 -0
- package/packages/common/node_modules/esbuild/README.md +3 -0
- package/packages/common/node_modules/esbuild/bin/esbuild +220 -0
- package/packages/common/node_modules/esbuild/install.js +285 -0
- package/packages/common/node_modules/esbuild/lib/main.d.ts +705 -0
- package/packages/common/node_modules/esbuild/lib/main.js +2239 -0
- package/packages/common/node_modules/esbuild/package.json +46 -0
- package/packages/server-mongodb/node_modules/esbuild/LICENSE.md +21 -0
- package/packages/server-mongodb/node_modules/esbuild/README.md +3 -0
- package/packages/server-mongodb/node_modules/esbuild/bin/esbuild +220 -0
- package/packages/server-mongodb/node_modules/esbuild/install.js +285 -0
- package/packages/server-mongodb/node_modules/esbuild/lib/main.d.ts +705 -0
- package/packages/server-mongodb/node_modules/esbuild/lib/main.js +2239 -0
- package/packages/server-mongodb/node_modules/esbuild/package.json +46 -0
- package/packages/server-postgresql/node_modules/esbuild/LICENSE.md +21 -0
- package/packages/server-postgresql/node_modules/esbuild/README.md +3 -0
- package/packages/server-postgresql/node_modules/esbuild/bin/esbuild +220 -0
- package/packages/server-postgresql/node_modules/esbuild/install.js +285 -0
- package/packages/server-postgresql/node_modules/esbuild/lib/main.d.ts +705 -0
- package/packages/server-postgresql/node_modules/esbuild/lib/main.js +2239 -0
- package/packages/server-postgresql/node_modules/esbuild/package.json +46 -0
- package/packages/types/node_modules/esbuild/LICENSE.md +21 -0
- package/packages/types/node_modules/esbuild/README.md +3 -0
- package/packages/types/node_modules/esbuild/bin/esbuild +220 -0
- package/packages/types/node_modules/esbuild/install.js +285 -0
- package/packages/types/node_modules/esbuild/lib/main.d.ts +705 -0
- package/packages/types/node_modules/esbuild/lib/main.js +2239 -0
- package/packages/types/node_modules/esbuild/package.json +46 -0
- package/packages/utils/node_modules/esbuild/LICENSE.md +21 -0
- package/packages/utils/node_modules/esbuild/README.md +3 -0
- package/packages/utils/node_modules/esbuild/bin/esbuild +220 -0
- package/packages/utils/node_modules/esbuild/install.js +285 -0
- package/packages/utils/node_modules/esbuild/lib/main.d.ts +705 -0
- package/packages/utils/node_modules/esbuild/lib/main.js +2239 -0
- package/packages/utils/node_modules/esbuild/package.json +46 -0
- package/src/api/errors.ts +3 -2
- package/src/api/server.ts +5 -2
- package/src/auth/google-oauth.ts +148 -17
- package/src/auth/index.ts +1 -0
- package/src/auth/routes.ts +25 -5
- package/src/collections/loader.ts +3 -3
- package/src/init.ts +14 -2
- package/history_diff.log +0 -385
- package/scratch.ts +0 -9
- package/test-ast.ts +0 -28
- package/test_output.txt +0 -1133
package/test_output.txt
DELETED
|
@@ -1,1133 +0,0 @@
|
|
|
1
|
-
PASS test/query-parser.test.ts
|
|
2
|
-
PASS test/storage-registry.test.ts
|
|
3
|
-
● Console
|
|
4
|
-
|
|
5
|
-
console.warn
|
|
6
|
-
[StorageRegistry] Storage "anything" not found, falling back to "(default)"
|
|
7
|
-
|
|
8
|
-
149 |
|
|
9
|
-
150 | // Fallback to default with warning
|
|
10
|
-
> 151 | console.warn(
|
|
11
|
-
| ^
|
|
12
|
-
152 | `[StorageRegistry] Storage "${id}" not found, falling back to "${DEFAULT_STORAGE_ID}"`
|
|
13
|
-
153 | );
|
|
14
|
-
154 | return this.getDefault();
|
|
15
|
-
|
|
16
|
-
at DefaultStorageRegistry.getOrDefault (src/storage/storage-registry.ts:151:17)
|
|
17
|
-
at test/storage-registry.test.ts:133:44
|
|
18
|
-
at Object.<anonymous> (../../node_modules/expect/build/toThrowMatchers.js:74:11)
|
|
19
|
-
at Object.throwingMatcher [as toThrow] (../../node_modules/expect/build/index.js:320:21)
|
|
20
|
-
at Object.<anonymous> (test/storage-registry.test.ts:133:70)
|
|
21
|
-
|
|
22
|
-
PASS test/jwt-security.test.ts
|
|
23
|
-
PASS test/driver-registry.test.ts
|
|
24
|
-
● Console
|
|
25
|
-
|
|
26
|
-
console.warn
|
|
27
|
-
[DriverRegistry] Driver "anything" not found, falling back to "(default)"
|
|
28
|
-
|
|
29
|
-
145 |
|
|
30
|
-
146 | // Fallback to default with warning
|
|
31
|
-
> 147 | console.warn(
|
|
32
|
-
| ^
|
|
33
|
-
148 | `[DriverRegistry] Driver "${id}" not found, falling back to "${DEFAULT_DRIVER_ID}"`
|
|
34
|
-
149 | );
|
|
35
|
-
150 | return this.getDefault();
|
|
36
|
-
|
|
37
|
-
at DefaultDriverRegistry.getOrDefault (src/services/driver-registry.ts:147:17)
|
|
38
|
-
at test/driver-registry.test.ts:135:44
|
|
39
|
-
at Object.<anonymous> (../../node_modules/expect/build/toThrowMatchers.js:74:11)
|
|
40
|
-
at Object.throwingMatcher [as toThrow] (../../node_modules/expect/build/index.js:320:21)
|
|
41
|
-
at Object.<anonymous> (test/driver-registry.test.ts:135:70)
|
|
42
|
-
|
|
43
|
-
console.warn
|
|
44
|
-
[DriverRegistry] No "(default)" driver provided. Using "key" as the default.
|
|
45
|
-
|
|
46
|
-
96 | // If no explicit "(default)", use the first one as default
|
|
47
|
-
97 | const firstId = Object.keys(input)[0];
|
|
48
|
-
> 98 | console.warn(
|
|
49
|
-
| ^
|
|
50
|
-
99 | `[DriverRegistry] No "${DEFAULT_DRIVER_ID}" driver provided. ` +
|
|
51
|
-
100 | `Using "${firstId}" as the default.`
|
|
52
|
-
101 | );
|
|
53
|
-
|
|
54
|
-
at Function.create (src/services/driver-registry.ts:98:25)
|
|
55
|
-
at Object.<anonymous> (test/driver-registry.test.ts:275:52)
|
|
56
|
-
|
|
57
|
-
PASS test/middleware.test.ts
|
|
58
|
-
PASS test/jwt.test.ts
|
|
59
|
-
PASS test/storage-s3.test.ts
|
|
60
|
-
PASS test/auth-middleware-hono.test.ts
|
|
61
|
-
● Console
|
|
62
|
-
|
|
63
|
-
console.error
|
|
64
|
-
[AUTH] No token found! Auth header: undefined Query: undefined Path: /test
|
|
65
|
-
|
|
66
|
-
202 | }
|
|
67
|
-
203 | } else {
|
|
68
|
-
> 204 | console.error("[AUTH] No token found! Auth header:", authHeader, "Query:", queryToken, "Path:", c.req.path);
|
|
69
|
-
| ^
|
|
70
|
-
205 | c.set("driver", driver);
|
|
71
|
-
206 | }
|
|
72
|
-
207 | } catch (error) {
|
|
73
|
-
|
|
74
|
-
at src/auth/middleware.ts:204:29
|
|
75
|
-
at dispatch (../../node_modules/hono/dist/cjs/compose.js:43:23)
|
|
76
|
-
at ../../node_modules/hono/dist/cjs/compose.js:26:12
|
|
77
|
-
at ../../node_modules/hono/dist/cjs/hono-base.js:322:31
|
|
78
|
-
at Hono.#dispatch (../../node_modules/hono/dist/cjs/hono-base.js:332:7)
|
|
79
|
-
at Hono.fetch (../../node_modules/hono/dist/cjs/hono-base.js:346:26)
|
|
80
|
-
at Hono.request (../../node_modules/hono/dist/cjs/hono-base.js:365:17)
|
|
81
|
-
at Object.<anonymous> (test/auth-middleware-hono.test.ts:196:35)
|
|
82
|
-
|
|
83
|
-
console.error
|
|
84
|
-
[AUTH] No token found! Auth header: undefined Query: undefined Path: /test
|
|
85
|
-
|
|
86
|
-
202 | }
|
|
87
|
-
203 | } else {
|
|
88
|
-
> 204 | console.error("[AUTH] No token found! Auth header:", authHeader, "Query:", queryToken, "Path:", c.req.path);
|
|
89
|
-
| ^
|
|
90
|
-
205 | c.set("driver", driver);
|
|
91
|
-
206 | }
|
|
92
|
-
207 | } catch (error) {
|
|
93
|
-
|
|
94
|
-
at src/auth/middleware.ts:204:29
|
|
95
|
-
at dispatch (../../node_modules/hono/dist/cjs/compose.js:43:23)
|
|
96
|
-
at ../../node_modules/hono/dist/cjs/compose.js:26:12
|
|
97
|
-
at ../../node_modules/hono/dist/cjs/hono-base.js:322:31
|
|
98
|
-
at Hono.#dispatch (../../node_modules/hono/dist/cjs/hono-base.js:332:7)
|
|
99
|
-
at Hono.fetch (../../node_modules/hono/dist/cjs/hono-base.js:346:26)
|
|
100
|
-
at Hono.request (../../node_modules/hono/dist/cjs/hono-base.js:365:17)
|
|
101
|
-
at Object.<anonymous> (test/auth-middleware-hono.test.ts:207:35)
|
|
102
|
-
|
|
103
|
-
console.error
|
|
104
|
-
[AUTH] Rejecting with 401. Path: /test
|
|
105
|
-
|
|
106
|
-
212 |
|
|
107
|
-
213 | if (enforceAuth && !c.get("user")) {
|
|
108
|
-
> 214 | console.error("[AUTH] Rejecting with 401. Path:", c.req.path);
|
|
109
|
-
| ^
|
|
110
|
-
215 | return c.json({ error: { message: "Unauthorized: Invalid or missing token", code: "UNAUTHORIZED" } }, 401);
|
|
111
|
-
216 | }
|
|
112
|
-
217 |
|
|
113
|
-
|
|
114
|
-
at src/auth/middleware.ts:214:21
|
|
115
|
-
at dispatch (../../node_modules/hono/dist/cjs/compose.js:43:23)
|
|
116
|
-
at ../../node_modules/hono/dist/cjs/compose.js:26:12
|
|
117
|
-
at ../../node_modules/hono/dist/cjs/hono-base.js:322:31
|
|
118
|
-
at Hono.#dispatch (../../node_modules/hono/dist/cjs/hono-base.js:332:7)
|
|
119
|
-
at Hono.fetch (../../node_modules/hono/dist/cjs/hono-base.js:346:26)
|
|
120
|
-
at Hono.request (../../node_modules/hono/dist/cjs/hono-base.js:365:17)
|
|
121
|
-
at Object.<anonymous> (test/auth-middleware-hono.test.ts:207:35)
|
|
122
|
-
|
|
123
|
-
console.error
|
|
124
|
-
[AUTH] No token found! Auth header: undefined Query: undefined Path: /test
|
|
125
|
-
|
|
126
|
-
202 | }
|
|
127
|
-
203 | } else {
|
|
128
|
-
> 204 | console.error("[AUTH] No token found! Auth header:", authHeader, "Query:", queryToken, "Path:", c.req.path);
|
|
129
|
-
| ^
|
|
130
|
-
205 | c.set("driver", driver);
|
|
131
|
-
206 | }
|
|
132
|
-
207 | } catch (error) {
|
|
133
|
-
|
|
134
|
-
at src/auth/middleware.ts:204:29
|
|
135
|
-
at dispatch (../../node_modules/hono/dist/cjs/compose.js:43:23)
|
|
136
|
-
at ../../node_modules/hono/dist/cjs/compose.js:26:12
|
|
137
|
-
at ../../node_modules/hono/dist/cjs/hono-base.js:322:31
|
|
138
|
-
at Hono.#dispatch (../../node_modules/hono/dist/cjs/hono-base.js:332:7)
|
|
139
|
-
at Hono.fetch (../../node_modules/hono/dist/cjs/hono-base.js:346:26)
|
|
140
|
-
at Hono.request (../../node_modules/hono/dist/cjs/hono-base.js:365:17)
|
|
141
|
-
at Object.<anonymous> (test/auth-middleware-hono.test.ts:216:35)
|
|
142
|
-
|
|
143
|
-
PASS test/errors.test.ts
|
|
144
|
-
● Console
|
|
145
|
-
|
|
146
|
-
console.warn
|
|
147
|
-
⚠️ [API] GET /test → 404 NOT_FOUND: User not found
|
|
148
|
-
|
|
149
|
-
73 | if (error instanceof ApiError) {
|
|
150
|
-
74 | // Operational errors — log at warn level
|
|
151
|
-
> 75 | console.warn(
|
|
152
|
-
| ^
|
|
153
|
-
76 | `⚠️ [API] ${c.req.method} ${c.req.path} → ${error.statusCode} ${error.code}: ${error.message}`
|
|
154
|
-
77 | );
|
|
155
|
-
78 | return c.json({
|
|
156
|
-
|
|
157
|
-
at errorHandler (src/api/errors.ts:75:17)
|
|
158
|
-
at Object.<anonymous> (test/errors.test.ts:99:21)
|
|
159
|
-
|
|
160
|
-
console.warn
|
|
161
|
-
⚠️ [API] GET /test → 400 VALIDATION: Validation failed
|
|
162
|
-
|
|
163
|
-
73 | if (error instanceof ApiError) {
|
|
164
|
-
74 | // Operational errors — log at warn level
|
|
165
|
-
> 75 | console.warn(
|
|
166
|
-
| ^
|
|
167
|
-
76 | `⚠️ [API] ${c.req.method} ${c.req.path} → ${error.statusCode} ${error.code}: ${error.message}`
|
|
168
|
-
77 | );
|
|
169
|
-
78 | return c.json({
|
|
170
|
-
|
|
171
|
-
at errorHandler (src/api/errors.ts:75:17)
|
|
172
|
-
at Object.<anonymous> (test/errors.test.ts:110:21)
|
|
173
|
-
|
|
174
|
-
console.error
|
|
175
|
-
❌ [API] GET /test → 404 NOT_FOUND: Not found
|
|
176
|
-
|
|
177
|
-
89 |
|
|
178
|
-
90 | // Unexpected errors — log at error level with full stack
|
|
179
|
-
> 91 | console.error(
|
|
180
|
-
| ^
|
|
181
|
-
92 | `❌ [API] ${c.req.method} ${c.req.path} → ${statusCode} ${code}: ${error.message}`
|
|
182
|
-
93 | );
|
|
183
|
-
94 | console.error(error.stack || error);
|
|
184
|
-
|
|
185
|
-
at errorHandler (src/api/errors.ts:91:13)
|
|
186
|
-
at Object.<anonymous> (test/errors.test.ts:124:21)
|
|
187
|
-
|
|
188
|
-
console.error
|
|
189
|
-
Error: Not found
|
|
190
|
-
at Object.<anonymous> (/Users/francesco/rebase/packages/backend/test/errors.test.ts:123:35)
|
|
191
|
-
at Promise.then.completed (/Users/francesco/rebase/node_modules/jest-circus/build/utils.js:298:28)
|
|
192
|
-
at new Promise (<anonymous>)
|
|
193
|
-
at callAsyncCircusFn (/Users/francesco/rebase/node_modules/jest-circus/build/utils.js:231:10)
|
|
194
|
-
at _callCircusTest (/Users/francesco/rebase/node_modules/jest-circus/build/run.js:316:40)
|
|
195
|
-
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
196
|
-
at _runTest (/Users/francesco/rebase/node_modules/jest-circus/build/run.js:252:3)
|
|
197
|
-
at _runTestsForDescribeBlock (/Users/francesco/rebase/node_modules/jest-circus/build/run.js:126:9)
|
|
198
|
-
at _runTestsForDescribeBlock (/Users/francesco/rebase/node_modules/jest-circus/build/run.js:121:9)
|
|
199
|
-
at run (/Users/francesco/rebase/node_modules/jest-circus/build/run.js:71:3)
|
|
200
|
-
at runAndTransformResultsToJestFormat (/Users/francesco/rebase/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)
|
|
201
|
-
at jestAdapter (/Users/francesco/rebase/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)
|
|
202
|
-
at runTestInternal (/Users/francesco/rebase/node_modules/jest-runner/build/runTest.js:367:16)
|
|
203
|
-
at runTest (/Users/francesco/rebase/node_modules/jest-runner/build/runTest.js:444:34)
|
|
204
|
-
at Object.worker (/Users/francesco/rebase/node_modules/jest-runner/build/testWorker.js:106:12)
|
|
205
|
-
|
|
206
|
-
92 | `❌ [API] ${c.req.method} ${c.req.path} → ${statusCode} ${code}: ${error.message}`
|
|
207
|
-
93 | );
|
|
208
|
-
> 94 | console.error(error.stack || error);
|
|
209
|
-
| ^
|
|
210
|
-
95 |
|
|
211
|
-
96 | return c.json({
|
|
212
|
-
97 | error: {
|
|
213
|
-
|
|
214
|
-
at errorHandler (src/api/errors.ts:94:13)
|
|
215
|
-
at Object.<anonymous> (test/errors.test.ts:124:21)
|
|
216
|
-
|
|
217
|
-
console.error
|
|
218
|
-
❌ [API] GET /test → 500 INTERNAL_ERROR: Something broke
|
|
219
|
-
|
|
220
|
-
89 |
|
|
221
|
-
90 | // Unexpected errors — log at error level with full stack
|
|
222
|
-
> 91 | console.error(
|
|
223
|
-
| ^
|
|
224
|
-
92 | `❌ [API] ${c.req.method} ${c.req.path} → ${statusCode} ${code}: ${error.message}`
|
|
225
|
-
93 | );
|
|
226
|
-
94 | console.error(error.stack || error);
|
|
227
|
-
|
|
228
|
-
at errorHandler (src/api/errors.ts:91:13)
|
|
229
|
-
at Object.<anonymous> (test/errors.test.ts:135:21)
|
|
230
|
-
|
|
231
|
-
console.error
|
|
232
|
-
Error: Something broke
|
|
233
|
-
at Object.<anonymous> (/Users/francesco/rebase/packages/backend/test/errors.test.ts:134:21)
|
|
234
|
-
at Promise.then.completed (/Users/francesco/rebase/node_modules/jest-circus/build/utils.js:298:28)
|
|
235
|
-
at new Promise (<anonymous>)
|
|
236
|
-
at callAsyncCircusFn (/Users/francesco/rebase/node_modules/jest-circus/build/utils.js:231:10)
|
|
237
|
-
at _callCircusTest (/Users/francesco/rebase/node_modules/jest-circus/build/run.js:316:40)
|
|
238
|
-
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
239
|
-
at _runTest (/Users/francesco/rebase/node_modules/jest-circus/build/run.js:252:3)
|
|
240
|
-
at _runTestsForDescribeBlock (/Users/francesco/rebase/node_modules/jest-circus/build/run.js:126:9)
|
|
241
|
-
at _runTestsForDescribeBlock (/Users/francesco/rebase/node_modules/jest-circus/build/run.js:121:9)
|
|
242
|
-
at run (/Users/francesco/rebase/node_modules/jest-circus/build/run.js:71:3)
|
|
243
|
-
at runAndTransformResultsToJestFormat (/Users/francesco/rebase/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)
|
|
244
|
-
at jestAdapter (/Users/francesco/rebase/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)
|
|
245
|
-
at runTestInternal (/Users/francesco/rebase/node_modules/jest-runner/build/runTest.js:367:16)
|
|
246
|
-
at runTest (/Users/francesco/rebase/node_modules/jest-runner/build/runTest.js:444:34)
|
|
247
|
-
at Object.worker (/Users/francesco/rebase/node_modules/jest-runner/build/testWorker.js:106:12)
|
|
248
|
-
|
|
249
|
-
92 | `❌ [API] ${c.req.method} ${c.req.path} → ${statusCode} ${code}: ${error.message}`
|
|
250
|
-
93 | );
|
|
251
|
-
> 94 | console.error(error.stack || error);
|
|
252
|
-
| ^
|
|
253
|
-
95 |
|
|
254
|
-
96 | return c.json({
|
|
255
|
-
97 | error: {
|
|
256
|
-
|
|
257
|
-
at errorHandler (src/api/errors.ts:94:13)
|
|
258
|
-
at Object.<anonymous> (test/errors.test.ts:135:21)
|
|
259
|
-
|
|
260
|
-
console.error
|
|
261
|
-
❌ [API] GET /test → 429 RATE_LIMITED: Rate limited
|
|
262
|
-
|
|
263
|
-
89 |
|
|
264
|
-
90 | // Unexpected errors — log at error level with full stack
|
|
265
|
-
> 91 | console.error(
|
|
266
|
-
| ^
|
|
267
|
-
92 | `❌ [API] ${c.req.method} ${c.req.path} → ${statusCode} ${code}: ${error.message}`
|
|
268
|
-
93 | );
|
|
269
|
-
94 | console.error(error.stack || error);
|
|
270
|
-
|
|
271
|
-
at errorHandler (src/api/errors.ts:91:13)
|
|
272
|
-
at Object.<anonymous> (test/errors.test.ts:146:21)
|
|
273
|
-
|
|
274
|
-
console.error
|
|
275
|
-
Error: Rate limited
|
|
276
|
-
at Object.<anonymous> (/Users/francesco/rebase/packages/backend/test/errors.test.ts:145:35)
|
|
277
|
-
at Promise.then.completed (/Users/francesco/rebase/node_modules/jest-circus/build/utils.js:298:28)
|
|
278
|
-
at new Promise (<anonymous>)
|
|
279
|
-
at callAsyncCircusFn (/Users/francesco/rebase/node_modules/jest-circus/build/utils.js:231:10)
|
|
280
|
-
at _callCircusTest (/Users/francesco/rebase/node_modules/jest-circus/build/run.js:316:40)
|
|
281
|
-
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
282
|
-
at _runTest (/Users/francesco/rebase/node_modules/jest-circus/build/run.js:252:3)
|
|
283
|
-
at _runTestsForDescribeBlock (/Users/francesco/rebase/node_modules/jest-circus/build/run.js:126:9)
|
|
284
|
-
at _runTestsForDescribeBlock (/Users/francesco/rebase/node_modules/jest-circus/build/run.js:121:9)
|
|
285
|
-
at run (/Users/francesco/rebase/node_modules/jest-circus/build/run.js:71:3)
|
|
286
|
-
at runAndTransformResultsToJestFormat (/Users/francesco/rebase/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)
|
|
287
|
-
at jestAdapter (/Users/francesco/rebase/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)
|
|
288
|
-
at runTestInternal (/Users/francesco/rebase/node_modules/jest-runner/build/runTest.js:367:16)
|
|
289
|
-
at runTest (/Users/francesco/rebase/node_modules/jest-runner/build/runTest.js:444:34)
|
|
290
|
-
at Object.worker (/Users/francesco/rebase/node_modules/jest-runner/build/testWorker.js:106:12)
|
|
291
|
-
|
|
292
|
-
92 | `❌ [API] ${c.req.method} ${c.req.path} → ${statusCode} ${code}: ${error.message}`
|
|
293
|
-
93 | );
|
|
294
|
-
> 94 | console.error(error.stack || error);
|
|
295
|
-
| ^
|
|
296
|
-
95 |
|
|
297
|
-
96 | return c.json({
|
|
298
|
-
97 | error: {
|
|
299
|
-
|
|
300
|
-
at errorHandler (src/api/errors.ts:94:13)
|
|
301
|
-
at Object.<anonymous> (test/errors.test.ts:146:21)
|
|
302
|
-
|
|
303
|
-
PASS test/rate-limiter.test.ts
|
|
304
|
-
PASS test/errors-hono.test.ts
|
|
305
|
-
● Console
|
|
306
|
-
|
|
307
|
-
console.warn
|
|
308
|
-
⚠️ [API] GET /bad-request → 400 MISSING_FIELD: Missing required field
|
|
309
|
-
|
|
310
|
-
73 | if (error instanceof ApiError) {
|
|
311
|
-
74 | // Operational errors — log at warn level
|
|
312
|
-
> 75 | console.warn(
|
|
313
|
-
| ^
|
|
314
|
-
76 | `⚠️ [API] ${c.req.method} ${c.req.path} → ${error.statusCode} ${error.code}: ${error.message}`
|
|
315
|
-
77 | );
|
|
316
|
-
78 | return c.json({
|
|
317
|
-
|
|
318
|
-
at Hono.errorHandler (src/api/errors.ts:75:17)
|
|
319
|
-
at Hono.#handleError (../../node_modules/hono/dist/cjs/hono-base.js:289:19)
|
|
320
|
-
at Hono.#dispatch (../../node_modules/hono/dist/cjs/hono-base.js:313:33)
|
|
321
|
-
at Hono.fetch (../../node_modules/hono/dist/cjs/hono-base.js:346:26)
|
|
322
|
-
at Hono.request (../../node_modules/hono/dist/cjs/hono-base.js:365:17)
|
|
323
|
-
at Object.<anonymous> (test/errors-hono.test.ts:46:31)
|
|
324
|
-
|
|
325
|
-
console.warn
|
|
326
|
-
⚠️ [API] GET /unauthorized → 401 TOKEN_EXPIRED: Token expired
|
|
327
|
-
|
|
328
|
-
73 | if (error instanceof ApiError) {
|
|
329
|
-
74 | // Operational errors — log at warn level
|
|
330
|
-
> 75 | console.warn(
|
|
331
|
-
| ^
|
|
332
|
-
76 | `⚠️ [API] ${c.req.method} ${c.req.path} → ${error.statusCode} ${error.code}: ${error.message}`
|
|
333
|
-
77 | );
|
|
334
|
-
78 | return c.json({
|
|
335
|
-
|
|
336
|
-
at Hono.errorHandler (src/api/errors.ts:75:17)
|
|
337
|
-
at Hono.#handleError (../../node_modules/hono/dist/cjs/hono-base.js:289:19)
|
|
338
|
-
at Hono.#dispatch (../../node_modules/hono/dist/cjs/hono-base.js:313:33)
|
|
339
|
-
at Hono.fetch (../../node_modules/hono/dist/cjs/hono-base.js:346:26)
|
|
340
|
-
at Hono.request (../../node_modules/hono/dist/cjs/hono-base.js:365:17)
|
|
341
|
-
at Object.<anonymous> (test/errors-hono.test.ts:56:31)
|
|
342
|
-
|
|
343
|
-
console.warn
|
|
344
|
-
⚠️ [API] GET /forbidden → 403 FORBIDDEN: Admin only
|
|
345
|
-
|
|
346
|
-
73 | if (error instanceof ApiError) {
|
|
347
|
-
74 | // Operational errors — log at warn level
|
|
348
|
-
> 75 | console.warn(
|
|
349
|
-
| ^
|
|
350
|
-
76 | `⚠️ [API] ${c.req.method} ${c.req.path} → ${error.statusCode} ${error.code}: ${error.message}`
|
|
351
|
-
77 | );
|
|
352
|
-
78 | return c.json({
|
|
353
|
-
|
|
354
|
-
at Hono.errorHandler (src/api/errors.ts:75:17)
|
|
355
|
-
at Hono.#handleError (../../node_modules/hono/dist/cjs/hono-base.js:289:19)
|
|
356
|
-
at Hono.#dispatch (../../node_modules/hono/dist/cjs/hono-base.js:313:33)
|
|
357
|
-
at Hono.fetch (../../node_modules/hono/dist/cjs/hono-base.js:346:26)
|
|
358
|
-
at Hono.request (../../node_modules/hono/dist/cjs/hono-base.js:365:17)
|
|
359
|
-
at Object.<anonymous> (test/errors-hono.test.ts:64:31)
|
|
360
|
-
|
|
361
|
-
console.warn
|
|
362
|
-
⚠️ [API] GET /not-found → 404 NOT_FOUND: Entity not found
|
|
363
|
-
|
|
364
|
-
73 | if (error instanceof ApiError) {
|
|
365
|
-
74 | // Operational errors — log at warn level
|
|
366
|
-
> 75 | console.warn(
|
|
367
|
-
| ^
|
|
368
|
-
76 | `⚠️ [API] ${c.req.method} ${c.req.path} → ${error.statusCode} ${error.code}: ${error.message}`
|
|
369
|
-
77 | );
|
|
370
|
-
78 | return c.json({
|
|
371
|
-
|
|
372
|
-
at Hono.errorHandler (src/api/errors.ts:75:17)
|
|
373
|
-
at Hono.#handleError (../../node_modules/hono/dist/cjs/hono-base.js:289:19)
|
|
374
|
-
at Hono.#dispatch (../../node_modules/hono/dist/cjs/hono-base.js:313:33)
|
|
375
|
-
at Hono.fetch (../../node_modules/hono/dist/cjs/hono-base.js:346:26)
|
|
376
|
-
at Hono.request (../../node_modules/hono/dist/cjs/hono-base.js:365:17)
|
|
377
|
-
at Object.<anonymous> (test/errors-hono.test.ts:72:31)
|
|
378
|
-
|
|
379
|
-
console.warn
|
|
380
|
-
⚠️ [API] GET /conflict → 409 EMAIL_EXISTS: Email already exists
|
|
381
|
-
|
|
382
|
-
73 | if (error instanceof ApiError) {
|
|
383
|
-
74 | // Operational errors — log at warn level
|
|
384
|
-
> 75 | console.warn(
|
|
385
|
-
| ^
|
|
386
|
-
76 | `⚠️ [API] ${c.req.method} ${c.req.path} → ${error.statusCode} ${error.code}: ${error.message}`
|
|
387
|
-
77 | );
|
|
388
|
-
78 | return c.json({
|
|
389
|
-
|
|
390
|
-
at Hono.errorHandler (src/api/errors.ts:75:17)
|
|
391
|
-
at Hono.#handleError (../../node_modules/hono/dist/cjs/hono-base.js:289:19)
|
|
392
|
-
at Hono.#dispatch (../../node_modules/hono/dist/cjs/hono-base.js:313:33)
|
|
393
|
-
at Hono.fetch (../../node_modules/hono/dist/cjs/hono-base.js:346:26)
|
|
394
|
-
at Hono.request (../../node_modules/hono/dist/cjs/hono-base.js:365:17)
|
|
395
|
-
at Object.<anonymous> (test/errors-hono.test.ts:80:31)
|
|
396
|
-
|
|
397
|
-
console.warn
|
|
398
|
-
⚠️ [API] GET /internal → 500 INTERNAL_ERROR: Database connection failed
|
|
399
|
-
|
|
400
|
-
73 | if (error instanceof ApiError) {
|
|
401
|
-
74 | // Operational errors — log at warn level
|
|
402
|
-
> 75 | console.warn(
|
|
403
|
-
| ^
|
|
404
|
-
76 | `⚠️ [API] ${c.req.method} ${c.req.path} → ${error.statusCode} ${error.code}: ${error.message}`
|
|
405
|
-
77 | );
|
|
406
|
-
78 | return c.json({
|
|
407
|
-
|
|
408
|
-
at Hono.errorHandler (src/api/errors.ts:75:17)
|
|
409
|
-
at Hono.#handleError (../../node_modules/hono/dist/cjs/hono-base.js:289:19)
|
|
410
|
-
at Hono.#dispatch (../../node_modules/hono/dist/cjs/hono-base.js:313:33)
|
|
411
|
-
at Hono.fetch (../../node_modules/hono/dist/cjs/hono-base.js:346:26)
|
|
412
|
-
at Hono.request (../../node_modules/hono/dist/cjs/hono-base.js:365:17)
|
|
413
|
-
at Object.<anonymous> (test/errors-hono.test.ts:88:31)
|
|
414
|
-
|
|
415
|
-
console.warn
|
|
416
|
-
⚠️ [API] GET /service-unavailable → 503 SERVICE_UNAVAILABLE: Feature not configured
|
|
417
|
-
|
|
418
|
-
73 | if (error instanceof ApiError) {
|
|
419
|
-
74 | // Operational errors — log at warn level
|
|
420
|
-
> 75 | console.warn(
|
|
421
|
-
| ^
|
|
422
|
-
76 | `⚠️ [API] ${c.req.method} ${c.req.path} → ${error.statusCode} ${error.code}: ${error.message}`
|
|
423
|
-
77 | );
|
|
424
|
-
78 | return c.json({
|
|
425
|
-
|
|
426
|
-
at Hono.errorHandler (src/api/errors.ts:75:17)
|
|
427
|
-
at Hono.#handleError (../../node_modules/hono/dist/cjs/hono-base.js:289:19)
|
|
428
|
-
at Hono.#dispatch (../../node_modules/hono/dist/cjs/hono-base.js:313:33)
|
|
429
|
-
at Hono.fetch (../../node_modules/hono/dist/cjs/hono-base.js:346:26)
|
|
430
|
-
at Hono.request (../../node_modules/hono/dist/cjs/hono-base.js:365:17)
|
|
431
|
-
at Object.<anonymous> (test/errors-hono.test.ts:94:31)
|
|
432
|
-
|
|
433
|
-
console.error
|
|
434
|
-
❌ [API] GET /generic-error → 500 INTERNAL_ERROR: Something went wrong
|
|
435
|
-
|
|
436
|
-
89 |
|
|
437
|
-
90 | // Unexpected errors — log at error level with full stack
|
|
438
|
-
> 91 | console.error(
|
|
439
|
-
| ^
|
|
440
|
-
92 | `❌ [API] ${c.req.method} ${c.req.path} → ${statusCode} ${code}: ${error.message}`
|
|
441
|
-
93 | );
|
|
442
|
-
94 | console.error(error.stack || error);
|
|
443
|
-
|
|
444
|
-
at Hono.errorHandler (src/api/errors.ts:91:13)
|
|
445
|
-
at Hono.#handleError (../../node_modules/hono/dist/cjs/hono-base.js:289:19)
|
|
446
|
-
at Hono.#dispatch (../../node_modules/hono/dist/cjs/hono-base.js:313:33)
|
|
447
|
-
at Hono.fetch (../../node_modules/hono/dist/cjs/hono-base.js:346:26)
|
|
448
|
-
at Hono.request (../../node_modules/hono/dist/cjs/hono-base.js:365:17)
|
|
449
|
-
at Object.<anonymous> (test/errors-hono.test.ts:100:31)
|
|
450
|
-
|
|
451
|
-
console.error
|
|
452
|
-
Error: Something went wrong
|
|
453
|
-
at Array.<anonymous> (/Users/francesco/rebase/packages/backend/test/errors-hono.test.ts:33:19)
|
|
454
|
-
at Hono.#dispatch (/Users/francesco/rebase/node_modules/hono/dist/cjs/hono-base.js:309:38)
|
|
455
|
-
at Hono.fetch (/Users/francesco/rebase/node_modules/hono/dist/cjs/hono-base.js:346:26)
|
|
456
|
-
at Hono.request (/Users/francesco/rebase/node_modules/hono/dist/cjs/hono-base.js:365:17)
|
|
457
|
-
at Object.<anonymous> (/Users/francesco/rebase/packages/backend/test/errors-hono.test.ts:100:31)
|
|
458
|
-
at Promise.then.completed (/Users/francesco/rebase/node_modules/jest-circus/build/utils.js:298:28)
|
|
459
|
-
at new Promise (<anonymous>)
|
|
460
|
-
at callAsyncCircusFn (/Users/francesco/rebase/node_modules/jest-circus/build/utils.js:231:10)
|
|
461
|
-
at _callCircusTest (/Users/francesco/rebase/node_modules/jest-circus/build/run.js:316:40)
|
|
462
|
-
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
463
|
-
at _runTest (/Users/francesco/rebase/node_modules/jest-circus/build/run.js:252:3)
|
|
464
|
-
at _runTestsForDescribeBlock (/Users/francesco/rebase/node_modules/jest-circus/build/run.js:126:9)
|
|
465
|
-
at _runTestsForDescribeBlock (/Users/francesco/rebase/node_modules/jest-circus/build/run.js:121:9)
|
|
466
|
-
at run (/Users/francesco/rebase/node_modules/jest-circus/build/run.js:71:3)
|
|
467
|
-
at runAndTransformResultsToJestFormat (/Users/francesco/rebase/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)
|
|
468
|
-
at jestAdapter (/Users/francesco/rebase/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)
|
|
469
|
-
at runTestInternal (/Users/francesco/rebase/node_modules/jest-runner/build/runTest.js:367:16)
|
|
470
|
-
at runTest (/Users/francesco/rebase/node_modules/jest-runner/build/runTest.js:444:34)
|
|
471
|
-
at Object.worker (/Users/francesco/rebase/node_modules/jest-runner/build/testWorker.js:106:12)
|
|
472
|
-
|
|
473
|
-
92 | `❌ [API] ${c.req.method} ${c.req.path} → ${statusCode} ${code}: ${error.message}`
|
|
474
|
-
93 | );
|
|
475
|
-
> 94 | console.error(error.stack || error);
|
|
476
|
-
| ^
|
|
477
|
-
95 |
|
|
478
|
-
96 | return c.json({
|
|
479
|
-
97 | error: {
|
|
480
|
-
|
|
481
|
-
at Hono.errorHandler (src/api/errors.ts:94:13)
|
|
482
|
-
at Hono.#handleError (../../node_modules/hono/dist/cjs/hono-base.js:289:19)
|
|
483
|
-
at Hono.#dispatch (../../node_modules/hono/dist/cjs/hono-base.js:313:33)
|
|
484
|
-
at Hono.fetch (../../node_modules/hono/dist/cjs/hono-base.js:346:26)
|
|
485
|
-
at Hono.request (../../node_modules/hono/dist/cjs/hono-base.js:365:17)
|
|
486
|
-
at Object.<anonymous> (test/errors-hono.test.ts:100:31)
|
|
487
|
-
|
|
488
|
-
console.error
|
|
489
|
-
❌ [API] GET /error-with-code → 500 RATE_LIMITED: Rate limited
|
|
490
|
-
|
|
491
|
-
89 |
|
|
492
|
-
90 | // Unexpected errors — log at error level with full stack
|
|
493
|
-
> 91 | console.error(
|
|
494
|
-
| ^
|
|
495
|
-
92 | `❌ [API] ${c.req.method} ${c.req.path} → ${statusCode} ${code}: ${error.message}`
|
|
496
|
-
93 | );
|
|
497
|
-
94 | console.error(error.stack || error);
|
|
498
|
-
|
|
499
|
-
at Hono.errorHandler (src/api/errors.ts:91:13)
|
|
500
|
-
at Hono.#handleError (../../node_modules/hono/dist/cjs/hono-base.js:289:19)
|
|
501
|
-
at Hono.#dispatch (../../node_modules/hono/dist/cjs/hono-base.js:313:33)
|
|
502
|
-
at Hono.fetch (../../node_modules/hono/dist/cjs/hono-base.js:346:26)
|
|
503
|
-
at Hono.request (../../node_modules/hono/dist/cjs/hono-base.js:365:17)
|
|
504
|
-
at Object.<anonymous> (test/errors-hono.test.ts:109:31)
|
|
505
|
-
|
|
506
|
-
console.error
|
|
507
|
-
Error: Rate limited
|
|
508
|
-
at Array.<anonymous> (/Users/francesco/rebase/packages/backend/test/errors-hono.test.ts:36:25)
|
|
509
|
-
at Hono.#dispatch (/Users/francesco/rebase/node_modules/hono/dist/cjs/hono-base.js:309:38)
|
|
510
|
-
at Hono.fetch (/Users/francesco/rebase/node_modules/hono/dist/cjs/hono-base.js:346:26)
|
|
511
|
-
at Hono.request (/Users/francesco/rebase/node_modules/hono/dist/cjs/hono-base.js:365:17)
|
|
512
|
-
at Object.<anonymous> (/Users/francesco/rebase/packages/backend/test/errors-hono.test.ts:109:31)
|
|
513
|
-
at Promise.then.completed (/Users/francesco/rebase/node_modules/jest-circus/build/utils.js:298:28)
|
|
514
|
-
at new Promise (<anonymous>)
|
|
515
|
-
at callAsyncCircusFn (/Users/francesco/rebase/node_modules/jest-circus/build/utils.js:231:10)
|
|
516
|
-
at _callCircusTest (/Users/francesco/rebase/node_modules/jest-circus/build/run.js:316:40)
|
|
517
|
-
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
518
|
-
at _runTest (/Users/francesco/rebase/node_modules/jest-circus/build/run.js:252:3)
|
|
519
|
-
at _runTestsForDescribeBlock (/Users/francesco/rebase/node_modules/jest-circus/build/run.js:126:9)
|
|
520
|
-
at _runTestsForDescribeBlock (/Users/francesco/rebase/node_modules/jest-circus/build/run.js:121:9)
|
|
521
|
-
at run (/Users/francesco/rebase/node_modules/jest-circus/build/run.js:71:3)
|
|
522
|
-
at runAndTransformResultsToJestFormat (/Users/francesco/rebase/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)
|
|
523
|
-
at jestAdapter (/Users/francesco/rebase/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)
|
|
524
|
-
at runTestInternal (/Users/francesco/rebase/node_modules/jest-runner/build/runTest.js:367:16)
|
|
525
|
-
at runTest (/Users/francesco/rebase/node_modules/jest-runner/build/runTest.js:444:34)
|
|
526
|
-
at Object.worker (/Users/francesco/rebase/node_modules/jest-runner/build/testWorker.js:106:12)
|
|
527
|
-
|
|
528
|
-
92 | `❌ [API] ${c.req.method} ${c.req.path} → ${statusCode} ${code}: ${error.message}`
|
|
529
|
-
93 | );
|
|
530
|
-
> 94 | console.error(error.stack || error);
|
|
531
|
-
| ^
|
|
532
|
-
95 |
|
|
533
|
-
96 | return c.json({
|
|
534
|
-
97 | error: {
|
|
535
|
-
|
|
536
|
-
at Hono.errorHandler (src/api/errors.ts:94:13)
|
|
537
|
-
at Hono.#handleError (../../node_modules/hono/dist/cjs/hono-base.js:289:19)
|
|
538
|
-
at Hono.#dispatch (../../node_modules/hono/dist/cjs/hono-base.js:313:33)
|
|
539
|
-
at Hono.fetch (../../node_modules/hono/dist/cjs/hono-base.js:346:26)
|
|
540
|
-
at Hono.request (../../node_modules/hono/dist/cjs/hono-base.js:365:17)
|
|
541
|
-
at Object.<anonymous> (test/errors-hono.test.ts:109:31)
|
|
542
|
-
|
|
543
|
-
console.warn
|
|
544
|
-
⚠️ [API] GET /unauthorized → 401 TOKEN_EXPIRED: Token expired
|
|
545
|
-
|
|
546
|
-
73 | if (error instanceof ApiError) {
|
|
547
|
-
74 | // Operational errors — log at warn level
|
|
548
|
-
> 75 | console.warn(
|
|
549
|
-
| ^
|
|
550
|
-
76 | `⚠️ [API] ${c.req.method} ${c.req.path} → ${error.statusCode} ${error.code}: ${error.message}`
|
|
551
|
-
77 | );
|
|
552
|
-
78 | return c.json({
|
|
553
|
-
|
|
554
|
-
at Hono.errorHandler (src/api/errors.ts:75:17)
|
|
555
|
-
at Hono.#handleError (../../node_modules/hono/dist/cjs/hono-base.js:289:19)
|
|
556
|
-
at Hono.#dispatch (../../node_modules/hono/dist/cjs/hono-base.js:313:33)
|
|
557
|
-
at Hono.fetch (../../node_modules/hono/dist/cjs/hono-base.js:346:26)
|
|
558
|
-
at Hono.request (../../node_modules/hono/dist/cjs/hono-base.js:365:17)
|
|
559
|
-
at Object.<anonymous> (test/errors-hono.test.ts:116:31)
|
|
560
|
-
|
|
561
|
-
console.warn
|
|
562
|
-
⚠️ [API] GET /bad-request → 400 MISSING_FIELD: Missing required field
|
|
563
|
-
|
|
564
|
-
73 | if (error instanceof ApiError) {
|
|
565
|
-
74 | // Operational errors — log at warn level
|
|
566
|
-
> 75 | console.warn(
|
|
567
|
-
| ^
|
|
568
|
-
76 | `⚠️ [API] ${c.req.method} ${c.req.path} → ${error.statusCode} ${error.code}: ${error.message}`
|
|
569
|
-
77 | );
|
|
570
|
-
78 | return c.json({
|
|
571
|
-
|
|
572
|
-
at Hono.errorHandler (src/api/errors.ts:75:17)
|
|
573
|
-
at Hono.#handleError (../../node_modules/hono/dist/cjs/hono-base.js:289:19)
|
|
574
|
-
at Hono.#dispatch (../../node_modules/hono/dist/cjs/hono-base.js:313:33)
|
|
575
|
-
at Hono.fetch (../../node_modules/hono/dist/cjs/hono-base.js:346:26)
|
|
576
|
-
at Hono.request (../../node_modules/hono/dist/cjs/hono-base.js:365:17)
|
|
577
|
-
at Object.<anonymous> (test/errors-hono.test.ts:126:35)
|
|
578
|
-
|
|
579
|
-
console.warn
|
|
580
|
-
⚠️ [API] GET /unauthorized → 401 TOKEN_EXPIRED: Token expired
|
|
581
|
-
|
|
582
|
-
73 | if (error instanceof ApiError) {
|
|
583
|
-
74 | // Operational errors — log at warn level
|
|
584
|
-
> 75 | console.warn(
|
|
585
|
-
| ^
|
|
586
|
-
76 | `⚠️ [API] ${c.req.method} ${c.req.path} → ${error.statusCode} ${error.code}: ${error.message}`
|
|
587
|
-
77 | );
|
|
588
|
-
78 | return c.json({
|
|
589
|
-
|
|
590
|
-
at Hono.errorHandler (src/api/errors.ts:75:17)
|
|
591
|
-
at Hono.#handleError (../../node_modules/hono/dist/cjs/hono-base.js:289:19)
|
|
592
|
-
at Hono.#dispatch (../../node_modules/hono/dist/cjs/hono-base.js:313:33)
|
|
593
|
-
at Hono.fetch (../../node_modules/hono/dist/cjs/hono-base.js:346:26)
|
|
594
|
-
at Hono.request (../../node_modules/hono/dist/cjs/hono-base.js:365:17)
|
|
595
|
-
at Object.<anonymous> (test/errors-hono.test.ts:126:35)
|
|
596
|
-
|
|
597
|
-
console.warn
|
|
598
|
-
⚠️ [API] GET /forbidden → 403 FORBIDDEN: Admin only
|
|
599
|
-
|
|
600
|
-
73 | if (error instanceof ApiError) {
|
|
601
|
-
74 | // Operational errors — log at warn level
|
|
602
|
-
> 75 | console.warn(
|
|
603
|
-
| ^
|
|
604
|
-
76 | `⚠️ [API] ${c.req.method} ${c.req.path} → ${error.statusCode} ${error.code}: ${error.message}`
|
|
605
|
-
77 | );
|
|
606
|
-
78 | return c.json({
|
|
607
|
-
|
|
608
|
-
at Hono.errorHandler (src/api/errors.ts:75:17)
|
|
609
|
-
at Hono.#handleError (../../node_modules/hono/dist/cjs/hono-base.js:289:19)
|
|
610
|
-
at Hono.#dispatch (../../node_modules/hono/dist/cjs/hono-base.js:313:33)
|
|
611
|
-
at Hono.fetch (../../node_modules/hono/dist/cjs/hono-base.js:346:26)
|
|
612
|
-
at Hono.request (../../node_modules/hono/dist/cjs/hono-base.js:365:17)
|
|
613
|
-
at Object.<anonymous> (test/errors-hono.test.ts:126:35)
|
|
614
|
-
|
|
615
|
-
console.warn
|
|
616
|
-
⚠️ [API] GET /not-found → 404 NOT_FOUND: Entity not found
|
|
617
|
-
|
|
618
|
-
73 | if (error instanceof ApiError) {
|
|
619
|
-
74 | // Operational errors — log at warn level
|
|
620
|
-
> 75 | console.warn(
|
|
621
|
-
| ^
|
|
622
|
-
76 | `⚠️ [API] ${c.req.method} ${c.req.path} → ${error.statusCode} ${error.code}: ${error.message}`
|
|
623
|
-
77 | );
|
|
624
|
-
78 | return c.json({
|
|
625
|
-
|
|
626
|
-
at Hono.errorHandler (src/api/errors.ts:75:17)
|
|
627
|
-
at Hono.#handleError (../../node_modules/hono/dist/cjs/hono-base.js:289:19)
|
|
628
|
-
at Hono.#dispatch (../../node_modules/hono/dist/cjs/hono-base.js:313:33)
|
|
629
|
-
at Hono.fetch (../../node_modules/hono/dist/cjs/hono-base.js:346:26)
|
|
630
|
-
at Hono.request (../../node_modules/hono/dist/cjs/hono-base.js:365:17)
|
|
631
|
-
at Object.<anonymous> (test/errors-hono.test.ts:126:35)
|
|
632
|
-
|
|
633
|
-
console.warn
|
|
634
|
-
⚠️ [API] GET /internal → 500 INTERNAL_ERROR: Database connection failed
|
|
635
|
-
|
|
636
|
-
73 | if (error instanceof ApiError) {
|
|
637
|
-
74 | // Operational errors — log at warn level
|
|
638
|
-
> 75 | console.warn(
|
|
639
|
-
| ^
|
|
640
|
-
76 | `⚠️ [API] ${c.req.method} ${c.req.path} → ${error.statusCode} ${error.code}: ${error.message}`
|
|
641
|
-
77 | );
|
|
642
|
-
78 | return c.json({
|
|
643
|
-
|
|
644
|
-
at Hono.errorHandler (src/api/errors.ts:75:17)
|
|
645
|
-
at Hono.#handleError (../../node_modules/hono/dist/cjs/hono-base.js:289:19)
|
|
646
|
-
at Hono.#dispatch (../../node_modules/hono/dist/cjs/hono-base.js:313:33)
|
|
647
|
-
at Hono.fetch (../../node_modules/hono/dist/cjs/hono-base.js:346:26)
|
|
648
|
-
at Hono.request (../../node_modules/hono/dist/cjs/hono-base.js:365:17)
|
|
649
|
-
at Object.<anonymous> (test/errors-hono.test.ts:126:35)
|
|
650
|
-
|
|
651
|
-
console.error
|
|
652
|
-
❌ [API] GET /generic-error → 500 INTERNAL_ERROR: Something went wrong
|
|
653
|
-
|
|
654
|
-
89 |
|
|
655
|
-
90 | // Unexpected errors — log at error level with full stack
|
|
656
|
-
> 91 | console.error(
|
|
657
|
-
| ^
|
|
658
|
-
92 | `❌ [API] ${c.req.method} ${c.req.path} → ${statusCode} ${code}: ${error.message}`
|
|
659
|
-
93 | );
|
|
660
|
-
94 | console.error(error.stack || error);
|
|
661
|
-
|
|
662
|
-
at Hono.errorHandler (src/api/errors.ts:91:13)
|
|
663
|
-
at Hono.#handleError (../../node_modules/hono/dist/cjs/hono-base.js:289:19)
|
|
664
|
-
at Hono.#dispatch (../../node_modules/hono/dist/cjs/hono-base.js:313:33)
|
|
665
|
-
at Hono.fetch (../../node_modules/hono/dist/cjs/hono-base.js:346:26)
|
|
666
|
-
at Hono.request (../../node_modules/hono/dist/cjs/hono-base.js:365:17)
|
|
667
|
-
at Object.<anonymous> (test/errors-hono.test.ts:126:35)
|
|
668
|
-
|
|
669
|
-
console.error
|
|
670
|
-
Error: Something went wrong
|
|
671
|
-
at Array.<anonymous> (/Users/francesco/rebase/packages/backend/test/errors-hono.test.ts:33:19)
|
|
672
|
-
at Hono.#dispatch (/Users/francesco/rebase/node_modules/hono/dist/cjs/hono-base.js:309:38)
|
|
673
|
-
at Hono.fetch (/Users/francesco/rebase/node_modules/hono/dist/cjs/hono-base.js:346:26)
|
|
674
|
-
at Hono.request (/Users/francesco/rebase/node_modules/hono/dist/cjs/hono-base.js:365:17)
|
|
675
|
-
at Object.<anonymous> (/Users/francesco/rebase/packages/backend/test/errors-hono.test.ts:126:35)
|
|
676
|
-
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
677
|
-
|
|
678
|
-
92 | `❌ [API] ${c.req.method} ${c.req.path} → ${statusCode} ${code}: ${error.message}`
|
|
679
|
-
93 | );
|
|
680
|
-
> 94 | console.error(error.stack || error);
|
|
681
|
-
| ^
|
|
682
|
-
95 |
|
|
683
|
-
96 | return c.json({
|
|
684
|
-
97 | error: {
|
|
685
|
-
|
|
686
|
-
at Hono.errorHandler (src/api/errors.ts:94:13)
|
|
687
|
-
at Hono.#handleError (../../node_modules/hono/dist/cjs/hono-base.js:289:19)
|
|
688
|
-
at Hono.#dispatch (../../node_modules/hono/dist/cjs/hono-base.js:313:33)
|
|
689
|
-
at Hono.fetch (../../node_modules/hono/dist/cjs/hono-base.js:346:26)
|
|
690
|
-
at Hono.request (../../node_modules/hono/dist/cjs/hono-base.js:365:17)
|
|
691
|
-
at Object.<anonymous> (test/errors-hono.test.ts:126:35)
|
|
692
|
-
|
|
693
|
-
PASS test/storage-local.test.ts
|
|
694
|
-
FAIL test/admin-routes.test.ts
|
|
695
|
-
● Test suite failed to run
|
|
696
|
-
|
|
697
|
-
[96mtest/admin-routes.test.ts[0m:[93m93[0m:[93m59[0m - [91merror[0m[90m TS1005: [0m',' expected.
|
|
698
|
-
|
|
699
|
-
[7m93[0m deleteRole: jest.fn().mockResolvedValue(undefined): jest.fn().mockResolvedValue(undefined)
|
|
700
|
-
[7m [0m [91m ~[0m
|
|
701
|
-
[96mtest/admin-routes.test.ts[0m:[93m93[0m:[93m65[0m - [91merror[0m[90m TS1005: [0m',' expected.
|
|
702
|
-
|
|
703
|
-
[7m93[0m deleteRole: jest.fn().mockResolvedValue(undefined): jest.fn().mockResolvedValue(undefined)
|
|
704
|
-
[7m [0m [91m ~[0m
|
|
705
|
-
|
|
706
|
-
PASS test/auth-routes.test.ts
|
|
707
|
-
● Console
|
|
708
|
-
|
|
709
|
-
console.warn
|
|
710
|
-
⚠️ [API] POST /auth/register → 409 EMAIL_EXISTS: Email already registered
|
|
711
|
-
|
|
712
|
-
73 | if (error instanceof ApiError) {
|
|
713
|
-
74 | // Operational errors — log at warn level
|
|
714
|
-
> 75 | console.warn(
|
|
715
|
-
| ^
|
|
716
|
-
76 | `⚠️ [API] ${c.req.method} ${c.req.path} → ${error.statusCode} ${error.code}: ${error.message}`
|
|
717
|
-
77 | );
|
|
718
|
-
78 | return c.json({
|
|
719
|
-
|
|
720
|
-
at errorHandler (src/api/errors.ts:75:17)
|
|
721
|
-
at dispatch (../../node_modules/hono/dist/cjs/compose.js:47:25)
|
|
722
|
-
at dispatch (../../node_modules/hono/dist/cjs/compose.js:43:17)
|
|
723
|
-
at ../../node_modules/hono/dist/cjs/hono-base.js:322:25
|
|
724
|
-
at Object.<anonymous> (test/auth-routes.test.ts:199:25)
|
|
725
|
-
|
|
726
|
-
console.warn
|
|
727
|
-
⚠️ [API] POST /auth/register → 400 WEAK_PASSWORD: Too short
|
|
728
|
-
|
|
729
|
-
73 | if (error instanceof ApiError) {
|
|
730
|
-
74 | // Operational errors — log at warn level
|
|
731
|
-
> 75 | console.warn(
|
|
732
|
-
| ^
|
|
733
|
-
76 | `⚠️ [API] ${c.req.method} ${c.req.path} → ${error.statusCode} ${error.code}: ${error.message}`
|
|
734
|
-
77 | );
|
|
735
|
-
78 | return c.json({
|
|
736
|
-
|
|
737
|
-
at errorHandler (src/api/errors.ts:75:17)
|
|
738
|
-
at dispatch (../../node_modules/hono/dist/cjs/compose.js:47:25)
|
|
739
|
-
at dispatch (../../node_modules/hono/dist/cjs/compose.js:43:17)
|
|
740
|
-
at ../../node_modules/hono/dist/cjs/hono-base.js:322:25
|
|
741
|
-
at Object.<anonymous> (test/auth-routes.test.ts:209:25)
|
|
742
|
-
|
|
743
|
-
console.warn
|
|
744
|
-
⚠️ [API] POST /auth/register → 400 INVALID_INPUT: email: Invalid email address
|
|
745
|
-
|
|
746
|
-
73 | if (error instanceof ApiError) {
|
|
747
|
-
74 | // Operational errors — log at warn level
|
|
748
|
-
> 75 | console.warn(
|
|
749
|
-
| ^
|
|
750
|
-
76 | `⚠️ [API] ${c.req.method} ${c.req.path} → ${error.statusCode} ${error.code}: ${error.message}`
|
|
751
|
-
77 | );
|
|
752
|
-
78 | return c.json({
|
|
753
|
-
|
|
754
|
-
at errorHandler (src/api/errors.ts:75:17)
|
|
755
|
-
at dispatch (../../node_modules/hono/dist/cjs/compose.js:47:25)
|
|
756
|
-
at dispatch (../../node_modules/hono/dist/cjs/compose.js:43:17)
|
|
757
|
-
at ../../node_modules/hono/dist/cjs/hono-base.js:322:25
|
|
758
|
-
at Object.<anonymous> (test/auth-routes.test.ts:217:25)
|
|
759
|
-
|
|
760
|
-
console.warn
|
|
761
|
-
⚠️ [API] POST /auth/register → 400 INVALID_INPUT: password: Required
|
|
762
|
-
|
|
763
|
-
73 | if (error instanceof ApiError) {
|
|
764
|
-
74 | // Operational errors — log at warn level
|
|
765
|
-
> 75 | console.warn(
|
|
766
|
-
| ^
|
|
767
|
-
76 | `⚠️ [API] ${c.req.method} ${c.req.path} → ${error.statusCode} ${error.code}: ${error.message}`
|
|
768
|
-
77 | );
|
|
769
|
-
78 | return c.json({
|
|
770
|
-
|
|
771
|
-
at errorHandler (src/api/errors.ts:75:17)
|
|
772
|
-
at dispatch (../../node_modules/hono/dist/cjs/compose.js:47:25)
|
|
773
|
-
at dispatch (../../node_modules/hono/dist/cjs/compose.js:43:17)
|
|
774
|
-
at ../../node_modules/hono/dist/cjs/hono-base.js:322:25
|
|
775
|
-
at Object.<anonymous> (test/auth-routes.test.ts:225:25)
|
|
776
|
-
|
|
777
|
-
console.warn
|
|
778
|
-
⚠️ [API] POST /auth/register → 403 REGISTRATION_DISABLED: Registration is disabled
|
|
779
|
-
|
|
780
|
-
73 | if (error instanceof ApiError) {
|
|
781
|
-
74 | // Operational errors — log at warn level
|
|
782
|
-
> 75 | console.warn(
|
|
783
|
-
| ^
|
|
784
|
-
76 | `⚠️ [API] ${c.req.method} ${c.req.path} → ${error.statusCode} ${error.code}: ${error.message}`
|
|
785
|
-
77 | );
|
|
786
|
-
78 | return c.json({
|
|
787
|
-
|
|
788
|
-
at errorHandler (src/api/errors.ts:75:17)
|
|
789
|
-
at dispatch (../../node_modules/hono/dist/cjs/compose.js:47:25)
|
|
790
|
-
at dispatch (../../node_modules/hono/dist/cjs/compose.js:43:17)
|
|
791
|
-
at ../../node_modules/hono/dist/cjs/hono-base.js:322:25
|
|
792
|
-
at Object.<anonymous> (test/auth-routes.test.ts:233:25)
|
|
793
|
-
|
|
794
|
-
console.warn
|
|
795
|
-
⚠️ [API] POST /auth/login → 401 INVALID_CREDENTIALS: Invalid email or password
|
|
796
|
-
|
|
797
|
-
73 | if (error instanceof ApiError) {
|
|
798
|
-
74 | // Operational errors — log at warn level
|
|
799
|
-
> 75 | console.warn(
|
|
800
|
-
| ^
|
|
801
|
-
76 | `⚠️ [API] ${c.req.method} ${c.req.path} → ${error.statusCode} ${error.code}: ${error.message}`
|
|
802
|
-
77 | );
|
|
803
|
-
78 | return c.json({
|
|
804
|
-
|
|
805
|
-
at errorHandler (src/api/errors.ts:75:17)
|
|
806
|
-
at dispatch (../../node_modules/hono/dist/cjs/compose.js:47:25)
|
|
807
|
-
at dispatch (../../node_modules/hono/dist/cjs/compose.js:43:17)
|
|
808
|
-
at ../../node_modules/hono/dist/cjs/hono-base.js:322:25
|
|
809
|
-
at Object.<anonymous> (test/auth-routes.test.ts:276:25)
|
|
810
|
-
|
|
811
|
-
console.warn
|
|
812
|
-
⚠️ [API] POST /auth/login → 401 INVALID_CREDENTIALS: Invalid email or password
|
|
813
|
-
|
|
814
|
-
73 | if (error instanceof ApiError) {
|
|
815
|
-
74 | // Operational errors — log at warn level
|
|
816
|
-
> 75 | console.warn(
|
|
817
|
-
| ^
|
|
818
|
-
76 | `⚠️ [API] ${c.req.method} ${c.req.path} → ${error.statusCode} ${error.code}: ${error.message}`
|
|
819
|
-
77 | );
|
|
820
|
-
78 | return c.json({
|
|
821
|
-
|
|
822
|
-
at errorHandler (src/api/errors.ts:75:17)
|
|
823
|
-
at dispatch (../../node_modules/hono/dist/cjs/compose.js:47:25)
|
|
824
|
-
at dispatch (../../node_modules/hono/dist/cjs/compose.js:43:17)
|
|
825
|
-
at ../../node_modules/hono/dist/cjs/hono-base.js:322:25
|
|
826
|
-
at Object.<anonymous> (test/auth-routes.test.ts:287:25)
|
|
827
|
-
|
|
828
|
-
console.warn
|
|
829
|
-
⚠️ [API] POST /auth/login → 401 INVALID_CREDENTIALS: Invalid email or password
|
|
830
|
-
|
|
831
|
-
73 | if (error instanceof ApiError) {
|
|
832
|
-
74 | // Operational errors — log at warn level
|
|
833
|
-
> 75 | console.warn(
|
|
834
|
-
| ^
|
|
835
|
-
76 | `⚠️ [API] ${c.req.method} ${c.req.path} → ${error.statusCode} ${error.code}: ${error.message}`
|
|
836
|
-
77 | );
|
|
837
|
-
78 | return c.json({
|
|
838
|
-
|
|
839
|
-
at errorHandler (src/api/errors.ts:75:17)
|
|
840
|
-
at dispatch (../../node_modules/hono/dist/cjs/compose.js:47:25)
|
|
841
|
-
at dispatch (../../node_modules/hono/dist/cjs/compose.js:43:17)
|
|
842
|
-
at ../../node_modules/hono/dist/cjs/hono-base.js:322:25
|
|
843
|
-
at Object.<anonymous> (test/auth-routes.test.ts:295:25)
|
|
844
|
-
|
|
845
|
-
console.warn
|
|
846
|
-
⚠️ [API] POST /auth/login → 400 INVALID_INPUT: email: Required
|
|
847
|
-
|
|
848
|
-
73 | if (error instanceof ApiError) {
|
|
849
|
-
74 | // Operational errors — log at warn level
|
|
850
|
-
> 75 | console.warn(
|
|
851
|
-
| ^
|
|
852
|
-
76 | `⚠️ [API] ${c.req.method} ${c.req.path} → ${error.statusCode} ${error.code}: ${error.message}`
|
|
853
|
-
77 | );
|
|
854
|
-
78 | return c.json({
|
|
855
|
-
|
|
856
|
-
at errorHandler (src/api/errors.ts:75:17)
|
|
857
|
-
at dispatch (../../node_modules/hono/dist/cjs/compose.js:47:25)
|
|
858
|
-
at dispatch (../../node_modules/hono/dist/cjs/compose.js:43:17)
|
|
859
|
-
at ../../node_modules/hono/dist/cjs/hono-base.js:322:25
|
|
860
|
-
at Object.<anonymous> (test/auth-routes.test.ts:301:25)
|
|
861
|
-
|
|
862
|
-
console.warn
|
|
863
|
-
⚠️ [API] POST /auth/google → 503 NOT_CONFIGURED: Google login not configured
|
|
864
|
-
|
|
865
|
-
73 | if (error instanceof ApiError) {
|
|
866
|
-
74 | // Operational errors — log at warn level
|
|
867
|
-
> 75 | console.warn(
|
|
868
|
-
| ^
|
|
869
|
-
76 | `⚠️ [API] ${c.req.method} ${c.req.path} → ${error.statusCode} ${error.code}: ${error.message}`
|
|
870
|
-
77 | );
|
|
871
|
-
78 | return c.json({
|
|
872
|
-
|
|
873
|
-
at errorHandler (src/api/errors.ts:75:17)
|
|
874
|
-
at dispatch (../../node_modules/hono/dist/cjs/compose.js:47:25)
|
|
875
|
-
at dispatch (../../node_modules/hono/dist/cjs/compose.js:43:17)
|
|
876
|
-
at ../../node_modules/hono/dist/cjs/hono-base.js:322:25
|
|
877
|
-
at Object.<anonymous> (test/auth-routes.test.ts:318:25)
|
|
878
|
-
|
|
879
|
-
console.warn
|
|
880
|
-
⚠️ [API] POST /auth/google → 401 INVALID_TOKEN: Invalid Google token
|
|
881
|
-
|
|
882
|
-
73 | if (error instanceof ApiError) {
|
|
883
|
-
74 | // Operational errors — log at warn level
|
|
884
|
-
> 75 | console.warn(
|
|
885
|
-
| ^
|
|
886
|
-
76 | `⚠️ [API] ${c.req.method} ${c.req.path} → ${error.statusCode} ${error.code}: ${error.message}`
|
|
887
|
-
77 | );
|
|
888
|
-
78 | return c.json({
|
|
889
|
-
|
|
890
|
-
at errorHandler (src/api/errors.ts:75:17)
|
|
891
|
-
at dispatch (../../node_modules/hono/dist/cjs/compose.js:47:25)
|
|
892
|
-
at dispatch (../../node_modules/hono/dist/cjs/compose.js:43:17)
|
|
893
|
-
at ../../node_modules/hono/dist/cjs/hono-base.js:322:25
|
|
894
|
-
at Object.<anonymous> (test/auth-routes.test.ts:329:25)
|
|
895
|
-
|
|
896
|
-
console.warn
|
|
897
|
-
⚠️ [API] POST /auth/refresh → 401 INVALID_TOKEN: Invalid refresh token
|
|
898
|
-
|
|
899
|
-
73 | if (error instanceof ApiError) {
|
|
900
|
-
74 | // Operational errors — log at warn level
|
|
901
|
-
> 75 | console.warn(
|
|
902
|
-
| ^
|
|
903
|
-
76 | `⚠️ [API] ${c.req.method} ${c.req.path} → ${error.statusCode} ${error.code}: ${error.message}`
|
|
904
|
-
77 | );
|
|
905
|
-
78 | return c.json({
|
|
906
|
-
|
|
907
|
-
at Hono.errorHandler (src/api/errors.ts:75:17)
|
|
908
|
-
at Hono.#handleError (../../node_modules/hono/dist/cjs/hono-base.js:289:19)
|
|
909
|
-
at ../../node_modules/hono/dist/cjs/hono-base.js:317:41
|
|
910
|
-
at Object.<anonymous> (test/auth-routes.test.ts:444:25)
|
|
911
|
-
|
|
912
|
-
console.warn
|
|
913
|
-
⚠️ [API] POST /auth/refresh → 401 TOKEN_EXPIRED: Refresh token expired
|
|
914
|
-
|
|
915
|
-
73 | if (error instanceof ApiError) {
|
|
916
|
-
74 | // Operational errors — log at warn level
|
|
917
|
-
> 75 | console.warn(
|
|
918
|
-
| ^
|
|
919
|
-
76 | `⚠️ [API] ${c.req.method} ${c.req.path} → ${error.statusCode} ${error.code}: ${error.message}`
|
|
920
|
-
77 | );
|
|
921
|
-
78 | return c.json({
|
|
922
|
-
|
|
923
|
-
at Hono.errorHandler (src/api/errors.ts:75:17)
|
|
924
|
-
at Hono.#handleError (../../node_modules/hono/dist/cjs/hono-base.js:289:19)
|
|
925
|
-
at ../../node_modules/hono/dist/cjs/hono-base.js:317:41
|
|
926
|
-
at Object.<anonymous> (test/auth-routes.test.ts:462:25)
|
|
927
|
-
|
|
928
|
-
console.warn
|
|
929
|
-
⚠️ [API] POST /auth/refresh → 400 INVALID_INPUT: refreshToken: Required
|
|
930
|
-
|
|
931
|
-
73 | if (error instanceof ApiError) {
|
|
932
|
-
74 | // Operational errors — log at warn level
|
|
933
|
-
> 75 | console.warn(
|
|
934
|
-
| ^
|
|
935
|
-
76 | `⚠️ [API] ${c.req.method} ${c.req.path} → ${error.statusCode} ${error.code}: ${error.message}`
|
|
936
|
-
77 | );
|
|
937
|
-
78 | return c.json({
|
|
938
|
-
|
|
939
|
-
at Hono.errorHandler (src/api/errors.ts:75:17)
|
|
940
|
-
at Hono.#handleError (../../node_modules/hono/dist/cjs/hono-base.js:289:19)
|
|
941
|
-
at ../../node_modules/hono/dist/cjs/hono-base.js:317:41
|
|
942
|
-
at Object.<anonymous> (test/auth-routes.test.ts:471:25)
|
|
943
|
-
|
|
944
|
-
console.warn
|
|
945
|
-
⚠️ [API] POST /auth/forgot-password → 503 EMAIL_NOT_CONFIGURED: Email service not configured. Password reset is not available.
|
|
946
|
-
|
|
947
|
-
73 | if (error instanceof ApiError) {
|
|
948
|
-
74 | // Operational errors — log at warn level
|
|
949
|
-
> 75 | console.warn(
|
|
950
|
-
| ^
|
|
951
|
-
76 | `⚠️ [API] ${c.req.method} ${c.req.path} → ${error.statusCode} ${error.code}: ${error.message}`
|
|
952
|
-
77 | );
|
|
953
|
-
78 | return c.json({
|
|
954
|
-
|
|
955
|
-
at errorHandler (src/api/errors.ts:75:17)
|
|
956
|
-
at dispatch (../../node_modules/hono/dist/cjs/compose.js:47:25)
|
|
957
|
-
at dispatch (../../node_modules/hono/dist/cjs/compose.js:43:17)
|
|
958
|
-
at ../../node_modules/hono/dist/cjs/hono-base.js:322:25
|
|
959
|
-
at Object.<anonymous> (test/auth-routes.test.ts:525:25)
|
|
960
|
-
|
|
961
|
-
console.warn
|
|
962
|
-
⚠️ [API] POST /auth/reset-password → 400 INVALID_TOKEN: Invalid or expired reset token
|
|
963
|
-
|
|
964
|
-
73 | if (error instanceof ApiError) {
|
|
965
|
-
74 | // Operational errors — log at warn level
|
|
966
|
-
> 75 | console.warn(
|
|
967
|
-
| ^
|
|
968
|
-
76 | `⚠️ [API] ${c.req.method} ${c.req.path} → ${error.statusCode} ${error.code}: ${error.message}`
|
|
969
|
-
77 | );
|
|
970
|
-
78 | return c.json({
|
|
971
|
-
|
|
972
|
-
at errorHandler (src/api/errors.ts:75:17)
|
|
973
|
-
at dispatch (../../node_modules/hono/dist/cjs/compose.js:47:25)
|
|
974
|
-
at dispatch (../../node_modules/hono/dist/cjs/compose.js:43:17)
|
|
975
|
-
at ../../node_modules/hono/dist/cjs/hono-base.js:322:25
|
|
976
|
-
at Object.<anonymous> (test/auth-routes.test.ts:562:25)
|
|
977
|
-
|
|
978
|
-
console.warn
|
|
979
|
-
⚠️ [API] POST /auth/reset-password → 400 WEAK_PASSWORD: Too weak
|
|
980
|
-
|
|
981
|
-
73 | if (error instanceof ApiError) {
|
|
982
|
-
74 | // Operational errors — log at warn level
|
|
983
|
-
> 75 | console.warn(
|
|
984
|
-
| ^
|
|
985
|
-
76 | `⚠️ [API] ${c.req.method} ${c.req.path} → ${error.statusCode} ${error.code}: ${error.message}`
|
|
986
|
-
77 | );
|
|
987
|
-
78 | return c.json({
|
|
988
|
-
|
|
989
|
-
at errorHandler (src/api/errors.ts:75:17)
|
|
990
|
-
at dispatch (../../node_modules/hono/dist/cjs/compose.js:47:25)
|
|
991
|
-
at dispatch (../../node_modules/hono/dist/cjs/compose.js:43:17)
|
|
992
|
-
at ../../node_modules/hono/dist/cjs/hono-base.js:322:25
|
|
993
|
-
at Object.<anonymous> (test/auth-routes.test.ts:572:25)
|
|
994
|
-
|
|
995
|
-
console.warn
|
|
996
|
-
⚠️ [API] POST /auth/change-password → 401 INVALID_CREDENTIALS: Current password is incorrect
|
|
997
|
-
|
|
998
|
-
73 | if (error instanceof ApiError) {
|
|
999
|
-
74 | // Operational errors — log at warn level
|
|
1000
|
-
> 75 | console.warn(
|
|
1001
|
-
| ^
|
|
1002
|
-
76 | `⚠️ [API] ${c.req.method} ${c.req.path} → ${error.statusCode} ${error.code}: ${error.message}`
|
|
1003
|
-
77 | );
|
|
1004
|
-
78 | return c.json({
|
|
1005
|
-
|
|
1006
|
-
at errorHandler (src/api/errors.ts:75:17)
|
|
1007
|
-
at dispatch (../../node_modules/hono/dist/cjs/compose.js:47:25)
|
|
1008
|
-
at dispatch (../../node_modules/hono/dist/cjs/compose.js:43:17)
|
|
1009
|
-
at ../../node_modules/hono/dist/cjs/hono-base.js:322:25
|
|
1010
|
-
at Object.<anonymous> (test/auth-routes.test.ts:609:25)
|
|
1011
|
-
|
|
1012
|
-
console.warn
|
|
1013
|
-
⚠️ [API] POST /auth/change-password → 400 WEAK_PASSWORD: Too short
|
|
1014
|
-
|
|
1015
|
-
73 | if (error instanceof ApiError) {
|
|
1016
|
-
74 | // Operational errors — log at warn level
|
|
1017
|
-
> 75 | console.warn(
|
|
1018
|
-
| ^
|
|
1019
|
-
76 | `⚠️ [API] ${c.req.method} ${c.req.path} → ${error.statusCode} ${error.code}: ${error.message}`
|
|
1020
|
-
77 | );
|
|
1021
|
-
78 | return c.json({
|
|
1022
|
-
|
|
1023
|
-
at errorHandler (src/api/errors.ts:75:17)
|
|
1024
|
-
at dispatch (../../node_modules/hono/dist/cjs/compose.js:47:25)
|
|
1025
|
-
at dispatch (../../node_modules/hono/dist/cjs/compose.js:43:17)
|
|
1026
|
-
at ../../node_modules/hono/dist/cjs/hono-base.js:322:25
|
|
1027
|
-
at Object.<anonymous> (test/auth-routes.test.ts:621:25)
|
|
1028
|
-
|
|
1029
|
-
console.warn
|
|
1030
|
-
⚠️ [API] POST /auth/change-password → 400 INVALID_ACCOUNT: Cannot change password for this account
|
|
1031
|
-
|
|
1032
|
-
73 | if (error instanceof ApiError) {
|
|
1033
|
-
74 | // Operational errors — log at warn level
|
|
1034
|
-
> 75 | console.warn(
|
|
1035
|
-
| ^
|
|
1036
|
-
76 | `⚠️ [API] ${c.req.method} ${c.req.path} → ${error.statusCode} ${error.code}: ${error.message}`
|
|
1037
|
-
77 | );
|
|
1038
|
-
78 | return c.json({
|
|
1039
|
-
|
|
1040
|
-
at errorHandler (src/api/errors.ts:75:17)
|
|
1041
|
-
at dispatch (../../node_modules/hono/dist/cjs/compose.js:47:25)
|
|
1042
|
-
at dispatch (../../node_modules/hono/dist/cjs/compose.js:43:17)
|
|
1043
|
-
at ../../node_modules/hono/dist/cjs/hono-base.js:322:25
|
|
1044
|
-
at Object.<anonymous> (test/auth-routes.test.ts:638:25)
|
|
1045
|
-
|
|
1046
|
-
console.warn
|
|
1047
|
-
⚠️ [API] POST /auth/send-verification → 400 ALREADY_VERIFIED: Email is already verified
|
|
1048
|
-
|
|
1049
|
-
73 | if (error instanceof ApiError) {
|
|
1050
|
-
74 | // Operational errors — log at warn level
|
|
1051
|
-
> 75 | console.warn(
|
|
1052
|
-
| ^
|
|
1053
|
-
76 | `⚠️ [API] ${c.req.method} ${c.req.path} → ${error.statusCode} ${error.code}: ${error.message}`
|
|
1054
|
-
77 | );
|
|
1055
|
-
78 | return c.json({
|
|
1056
|
-
|
|
1057
|
-
at errorHandler (src/api/errors.ts:75:17)
|
|
1058
|
-
at dispatch (../../node_modules/hono/dist/cjs/compose.js:47:25)
|
|
1059
|
-
at dispatch (../../node_modules/hono/dist/cjs/compose.js:43:17)
|
|
1060
|
-
at ../../node_modules/hono/dist/cjs/hono-base.js:322:25
|
|
1061
|
-
at Object.<anonymous> (test/auth-routes.test.ts:668:29)
|
|
1062
|
-
|
|
1063
|
-
console.warn
|
|
1064
|
-
⚠️ [API] POST /auth/send-verification → 503 EMAIL_NOT_CONFIGURED: Email service not configured. Email verification is not available.
|
|
1065
|
-
|
|
1066
|
-
73 | if (error instanceof ApiError) {
|
|
1067
|
-
74 | // Operational errors — log at warn level
|
|
1068
|
-
> 75 | console.warn(
|
|
1069
|
-
| ^
|
|
1070
|
-
76 | `⚠️ [API] ${c.req.method} ${c.req.path} → ${error.statusCode} ${error.code}: ${error.message}`
|
|
1071
|
-
77 | );
|
|
1072
|
-
78 | return c.json({
|
|
1073
|
-
|
|
1074
|
-
at errorHandler (src/api/errors.ts:75:17)
|
|
1075
|
-
at dispatch (../../node_modules/hono/dist/cjs/compose.js:47:25)
|
|
1076
|
-
|
|
1077
|
-
console.warn
|
|
1078
|
-
⚠️ [API] GET /auth/verify-email → 400 INVALID_TOKEN: Invalid or expired verification token
|
|
1079
|
-
|
|
1080
|
-
73 | if (error instanceof ApiError) {
|
|
1081
|
-
74 | // Operational errors — log at warn level
|
|
1082
|
-
> 75 | console.warn(
|
|
1083
|
-
| ^
|
|
1084
|
-
76 | `⚠️ [API] ${c.req.method} ${c.req.path} → ${error.statusCode} ${error.code}: ${error.message}`
|
|
1085
|
-
77 | );
|
|
1086
|
-
78 | return c.json({
|
|
1087
|
-
|
|
1088
|
-
at Hono.errorHandler (src/api/errors.ts:75:17)
|
|
1089
|
-
at Hono.#handleError (../../node_modules/hono/dist/cjs/hono-base.js:289:19)
|
|
1090
|
-
at ../../node_modules/hono/dist/cjs/hono-base.js:317:41
|
|
1091
|
-
at Object.<anonymous> (test/auth-routes.test.ts:707:29)
|
|
1092
|
-
|
|
1093
|
-
console.warn
|
|
1094
|
-
⚠️ [API] GET /auth/verify-email → 400 INVALID_INPUT: Verification token is required
|
|
1095
|
-
|
|
1096
|
-
73 | if (error instanceof ApiError) {
|
|
1097
|
-
74 | // Operational errors — log at warn level
|
|
1098
|
-
> 75 | console.warn(
|
|
1099
|
-
| ^
|
|
1100
|
-
76 | `⚠️ [API] ${c.req.method} ${c.req.path} → ${error.statusCode} ${error.code}: ${error.message}`
|
|
1101
|
-
77 | );
|
|
1102
|
-
78 | return c.json({
|
|
1103
|
-
|
|
1104
|
-
at Hono.errorHandler (src/api/errors.ts:75:17)
|
|
1105
|
-
at Hono.#handleError (../../node_modules/hono/dist/cjs/hono-base.js:289:19)
|
|
1106
|
-
at ../../node_modules/hono/dist/cjs/hono-base.js:317:41
|
|
1107
|
-
at Object.<anonymous> (test/auth-routes.test.ts:715:29)
|
|
1108
|
-
|
|
1109
|
-
console.warn
|
|
1110
|
-
⚠️ [API] GET /auth/me → 404 NOT_FOUND: User not found
|
|
1111
|
-
|
|
1112
|
-
73 | if (error instanceof ApiError) {
|
|
1113
|
-
74 | // Operational errors — log at warn level
|
|
1114
|
-
> 75 | console.warn(
|
|
1115
|
-
| ^
|
|
1116
|
-
76 | `⚠️ [API] ${c.req.method} ${c.req.path} → ${error.statusCode} ${error.code}: ${error.message}`
|
|
1117
|
-
77 | );
|
|
1118
|
-
78 | return c.json({
|
|
1119
|
-
|
|
1120
|
-
at errorHandler (src/api/errors.ts:75:17)
|
|
1121
|
-
at dispatch (../../node_modules/hono/dist/cjs/compose.js:47:25)
|
|
1122
|
-
at dispatch (../../node_modules/hono/dist/cjs/compose.js:43:17)
|
|
1123
|
-
at ../../node_modules/hono/dist/cjs/hono-base.js:322:25
|
|
1124
|
-
at Object.<anonymous> (test/auth-routes.test.ts:744:25)
|
|
1125
|
-
|
|
1126
|
-
PASS test/ast-schema-editor.test.ts
|
|
1127
|
-
PASS test/password.test.ts
|
|
1128
|
-
|
|
1129
|
-
Test Suites: 1 failed, 15 passed, 16 total
|
|
1130
|
-
Tests: 333 passed, 333 total
|
|
1131
|
-
Snapshots: 0 total
|
|
1132
|
-
Time: 2.324 s
|
|
1133
|
-
Ran all test suites.
|