Skip to content

Conversation

@Mantisus
Copy link
Collaborator

Description

  • add guide about error handling

@Mantisus Mantisus requested a review from Copilot April 10, 2025 20:36
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.

Files not reviewed (1)
  • docs/guides/error_handling.mdx: Language not supported
Comments suppressed due to low confidence (2)

docs/guides/code_examples/error_handling/handle_proxy_error.py:29

  • [nitpick] Consider using a separator like an underscore (e.g. f'retry_{request.unique_key}') to improve the readability of the unique_key.
new_request = Request.from_url(request.url, unique_key=f'retry{request.unique_key}')

docs/guides/code_examples/error_handling/change_handle_error_status.py:33

  • If response.read() returns bytes, consider decoding the response (e.g. using response.read().decode('utf-8')) before passing it to json.loads to avoid potential errors.
data = json.loads(response.read())

@Mantisus
Copy link
Collaborator Author

Lately, we've been getting a lot of questions about error handling or related issues.

Any ideas on how to improve the examples or additional examples are welcome.

@Mantisus Mantisus self-assigned this Apr 10, 2025
@B4nan
Copy link
Member

B4nan commented Apr 11, 2025

Good idea, thanks!

We should add a similar guide to the JS version too I guess, would you be up for that too Max?

@Mantisus
Copy link
Collaborator Author

would you be up for that too Max?

I hardly ever write in JS.

I think that the code samples I can produce are hardly worth showing to anyone 😅

@B4nan
Copy link
Member

B4nan commented Apr 11, 2025

All right, no worries, someone else can handle that.

Mantisus and others added 2 commits April 23, 2025 15:53
Co-authored-by: Vlada Dusek <v.dusek96@gmail.com>
Copy link
Collaborator

@vdusek vdusek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's great, thanks 🙂 .

@Pijukatel Pijukatel merged commit 65dc880 into apify:master Apr 24, 2025
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants