mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
**View diff without whitespace**
When using adapters, throwing a JS error from a App Route Handler didn't
set the OTEL status code correctly.
It was doing this:
```js
try {
tracer.trace(() => {
try {
// handle...
} finally {
setOtel();
}
});
} catch(e){
send500();
}
```
Which I now changed to
```js
tracer.trace(() => {
try {
// handle...
} catch(e){
send500();
} finally {
setOtel();
}
});
```