nathonius / obsidian-trello

An Obsidian Plugin that connects Trello cards to Obsidian notes.
https://trello.com/b/1fVRPLKO/obsidian-trello
MIT License
109 stars 7 forks source link

handle could not find card/board errors #21

Open nathonius opened 3 years ago

nathonius commented 3 years ago

If an ID is bad, Trello seems to return 404 errors with a plaintext response indicating the issue. For a missing card:

GET https://api.trello.com/1/boards/61166a47d22de30904a7b6b5/cards/6132b966d6aa0a1696621cd3
404
Could not find the card

For a missing board (or card if it's the root resource requested):

GET https://api.trello.com/1/boards/61166a47a22de30904a7b6b5
404
The requested resource was not found.

Handling 404s is an easy win, even if it's just a generic 404 message. Right now I'm only displaying the generic "Could not reach Trello" message, which encourages a new token/trying again later. Those definitely don't help in this scenario.

nathonius commented 3 years ago

It also seems to be getting stuck on the error view after a 404. Likely I missed handling an error somewhere.

nathonius commented 3 years ago

handle could not find card/board errors

nathonius commented 3 years ago

Issue #21: handle could not find card/board errors