Skip to content

Better error handling and logging for Apify proxy configuration #262

@HonzaTuron

Description

@HonzaTuron

Feature

We want to change the behavior of the instance of Actor.createProxyConfiguration

Current behavior:

  • throws an error if a user is not logged in (doesn't provide the proxy password)
  • throws an error if the user doesn't have access to the Apify proxy

Suggested change:
We would like to just print a warning to the console instead (or create some safer createProxyConfiguration) on the local environment. The Apify proxy just wouldn't be used at all, the configuration would do nothing.

Also, we proposed adding an additional warning - if the user has access to the Apify proxy but can't use it locally (this must be explained properly - free plan users).

We also propose an improved copy for the original error.

  • It must be clear from the first error user can simply use CLI apify login cmd to get the proxy password.

Motivation

Make Apify templates as seamless as possible. Now, a developer has to think about where it can be run and catch different errors. It is not clear from the error what to do and we have feedback from real users that struggled with this for quite some time.

Ideal solution or implementation, and any additional constraints

Make Actor.createProxyConfiguration with warnings instead of error for local environment.

Alternative solutions or implementations

No response

Other context

No response

Metadata

Metadata

Assignees

Labels

high priorityDo this ASAP! This is for mission-critical work or work that blocks other teams in their work.t-toolingIssues with this label are in the ownership of the tooling team.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions