mirror of
https://github.com/zoriya/elysia.git
synced 2026-08-15 18:44:25 +00:00
🔧 fix: #1294 return status from derive and resolve shouldn't call onError
This commit is contained in:
@@ -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())
|
||||
Reference in New Issue
Block a user