Skip to content

Async stack traces for callback errors #1077

Closed
@aalexgabi

Description

@aalexgabi

What problem are you trying to solve?

I need to know the caller that generated a given http error.

Describe the feature

I use node 13 which has async stack traces but I don't have the caller stack trace when using got. Instead I get this stack:

    err HTTPError: Response code 404 (Not Found)
        at EventEmitter.<anonymous> (.../node_modules/got/dist/
source/as-promise.js:118:31)
        at processTicksAndRejections (internal/process/task_queues.js:97:5) {
      name: 'HTTPError'
    }

I guess this happens because the connection can be used by multiple callers but there should be a way to have the whole stack.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions