Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix default project #5639

Merged
merged 1 commit into from
Jul 16, 2023
Merged

Fix default project #5639

merged 1 commit into from
Jul 16, 2023

Conversation

stnguyen90
Copy link
Contributor

@stnguyen90 stnguyen90 commented Jun 2, 2023

What does this PR do?

Don't default to console project

Defaulting to the console project leads to misleading error messages. For example, you can get a CORS error saying you haven't configured a platform yet, but the actual error is missing project ID. Another example is a list documents that returns a database not found error but the real error was missing project id.

Test Plan

Passing unit and e2e tests

Related PRs and Issues

Depends on:

Checklist

  • Have you read the Contributing Guidelines on issues?
  • If the PR includes a change to an API's metadata (desc, label, params, etc.), does it also include updated API specs and example docs?

@stnguyen90 stnguyen90 changed the base branch from master to 1.4.x June 2, 2023 19:18
@stnguyen90 stnguyen90 changed the base branch from 1.4.x to master June 3, 2023 05:21
@stnguyen90 stnguyen90 changed the base branch from master to 1.4.x June 3, 2023 05:21
@stnguyen90 stnguyen90 changed the base branch from 1.4.x to master June 5, 2023 16:05
Defaulting to the console project leads to misleading error messages.
For example, you can get a CORS error saying you haven't configured
a platform yet, but the actual error is missing project ID.
@stnguyen90 stnguyen90 requested a review from eldadfux June 5, 2023 17:12
@stnguyen90 stnguyen90 marked this pull request as ready for review June 5, 2023 17:15
@stnguyen90
Copy link
Contributor Author

One place where we make an API call w/o a project is in the CLI when we check the endpoint: https://github.com/appwrite/sdk-for-cli/blob/b4619977eb95ca6650aa5291eb6a26d6bfa46eda/lib/commands/generic.js#L86. This should be a quick fix, though.

@eldadfux
Copy link
Member

@stnguyen90 let's merge this once we're ready to release the CLI as well

@stnguyen90
Copy link
Contributor Author

@eldadfux, the SDK generator has been updated.

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.

None yet

2 participants