Skip to content

Commit

Permalink
Update error message when record key not found for project (#3628)
Browse files Browse the repository at this point in the history
- close #1449
  • Loading branch information
jennifer-shehane authored and flotwig committed Mar 1, 2019
1 parent e4cb364 commit 0a87734
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
4 changes: 3 additions & 1 deletion packages/server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,6 @@ To run an individual e2e test:
```bash
## runs tests that match "base_url"
npm run test-e2e -- --spec base_url
```
```

To update snapshots, see `snap-shot-it` instructions: https://github.com/bahmutov/snap-shot-it#advanced-use
6 changes: 2 additions & 4 deletions packages/server/__snapshots__/7_record_spec.coffee.js
Original file line number Diff line number Diff line change
Expand Up @@ -592,13 +592,11 @@ https://on.cypress.io/recording-project-runs
`

exports['e2e record api interaction errors recordKey and projectId errors and exits on 401 1'] = `
We failed trying to authenticate this project: pid123
Your Record Key is invalid: f858a...ee7e1
Your Record Key f858a...ee7e1 is not valid with this project: pid123
It may have been recently revoked by you or another user.
Please log into the Dashboard to see the updated token.
Please log into the Dashboard to see the valid record keys.
https://on.cypress.io/dashboard/projects/pid123
Expand Down
6 changes: 2 additions & 4 deletions packages/server/lib/errors.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -427,13 +427,11 @@ getMsgByType = (type, arg1 = {}, arg2) ->
"""
when "DASHBOARD_RECORD_KEY_NOT_VALID"
"""
We failed trying to authenticate this project: #{chalk.blue(arg2)}
Your Record Key is invalid: #{chalk.yellow(arg1)}
Your Record Key #{chalk.yellow(arg1)} is not valid with this project: #{chalk.blue(arg2)}
It may have been recently revoked by you or another user.
Please log into the Dashboard to see the updated token.
Please log into the Dashboard to see the valid record keys.
https://on.cypress.io/dashboard/projects/#{arg2}
"""
Expand Down

0 comments on commit 0a87734

Please sign in to comment.