🔧 fix: #1294 return status from derive and resolve shouldn't call onError

This commit is contained in:
saltyaom
2025-08-07 22:58:13 +07:00
parent c8649bdf42
commit 730cd88770
5 changed files with 85 additions and 33 deletions
+19
View File
@@ -0,0 +1,19 @@
import { Elysia, t } from '../src'
new Elysia()
.post('/', ({ body }) => body, {
body: t.Uint8Array()
})
.listen(3000)
const response = await fetch('http://localhost:3000', {
method: 'POST',
body: new Uint8Array([
229, 143, 175, 230, 132, 155, 227, 129, 143, 227, 129, 166, 227, 129,
148, 227, 130, 129, 227, 130, 147
]),
headers: { 'content-type': 'application/octet-stream' }
})
console.log(response.status)
console.log(await response.text())