Skip to content

Concurrent Scrape Errors should include additional conext about the URL and request which failed #4

@twosdai

Description

@twosdai

Hey,

Currently when running a concurrent scrape if an error is thrown its simply caught and returned as is. Meaning generally there is significant context loss about the URL actually being requested, headers used etc...

Right now I don't see an easy way to get this information while running requests concurrently.

The offending bit of code is here:
https://github.com/scrapfly/typescript-scrapfly/blob/main/src/client.ts#L194

I would have made a pull request regarding this, however I see that in this repo typed errors exist, and its not clear to me exactly which typed error should be returned in the case of the requesting site returning an HTTP error. If you let me know which error class should be used, I can implement a pull request.

Additionally if I am wrong please feel free to call me out, not trying to create more work, just looking for a way to get a URL in the error response.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions