-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Labels
good first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Description
π Feature description
If the cookie in the pref.json is set but invalid, appwrite init project returns with:
β Error User (role: guests) missing scope (projects.read)
with verbose
$ appwrite init project --verbose
? How would you like to start? Link this directory to an existing Appwrite project
AppwriteException [Error]: User (role: guests) missing scope (projects.read)
at Client.call (/Users/steven/.nvm/versions/node/v16.16.0/lib/node_modules/appwrite-cli/lib/client.js:209:19)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async projectsList (/Users/steven/.nvm/versions/node/v16.16.0/lib/node_modules/appwrite-cli/lib/commands/projects.js:33:16)
at async Object.choices (/Users/steven/.nvm/versions/node/v16.16.0/lib/node_modules/appwrite-cli/lib/questions.js:129:28) {
code: 401,
response: [Object: null prototype] {
message: 'User (role: guests) missing scope (projects.read)',
code: 401,
type: 'general_unauthorized_scope',
version: 'dev',
file: '/usr/src/code/app/controllers/general.php',
line: 365,
trace: [
[Object: null prototype],
[Object: null prototype],
[Object: null prototype]
]
}
}
β Error User (role: guests) missing scope (projects.read)It would be nice if the error message was more helpful. Tanmoy Karmakar has suggested:
Cannot access projects. Login is required use
appwrite logincommand
FYI, if the cookie is not set we respond with:
β Error Session not found. Please run `appwrite login` to create a session
π€ Pitch
The current error is very technical and doesn't give the user any guidance on how to proceed. A clearer, more helpful error message will create a better developer experience.
π Have you spent some time to check if this issue has been raised before?
- I checked and didn't find similar issue
π’ Have you read the Code of Conduct?
- I have read the Code of Conduct
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed