Skip to content
This repository has been archived by the owner on Mar 13, 2023. It is now read-only.

Commit

Permalink
fix(project): return useful error when API key is missing
Browse files Browse the repository at this point in the history
ISSUES CLOSED: #106
  • Loading branch information
moranje committed Mar 26, 2019
1 parent c9409d9 commit 7fbc41b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/todoist/rest-api-v8.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ const Adapter: todoist.AdapterFactory = compose({
// 'Content-Type': 'application/json'
}
})

if (!this.token) {
throw new Error(
'Missing Todoist API token. Add a token using the `todo:setting token <token>` command.'
)
}
},

methods: {
Expand Down

0 comments on commit 7fbc41b

Please sign in to comment.