denoland / denoland/deploy_feedback

Error `stack` line numbers do not match source line numbers

Open
#262 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
79
Forks
5
PR merge metrics
No merged PRs in 30d

Description

The following code:
https://dash.deno.com/playground/close-kingfisher-10
```ts
import { serve } from "https://deno.land/std@0.145.0/http/server.ts";

const error = new Error('Error from line 3');
serve((req: Request) => new Response(error.stack));
```

Results in:
```
Error: Error from line 3
at file:///src/main.ts:2:15
```

Whereas it should be:
```
Error: Error from line 3
at file:///src/main.ts:3:15
```

As far as I can tell, `import` lines are not counted.

For example, this error reported to Sentry incorrectly highlights the erroring line at 8 whereas it should be 10:
https://sentry.io/share/issue/a13a2a885e9c40caa77e6e12b3ae9b75/

image

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.