[otel] Correctly set error code attributes for App API routes (#94979)
**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();
}
});
```
Showing
Please
register
or
sign in
to comment