Open Lilja opened 1 year ago
I would much rather deal with the result pattern of data, instead of having to try-catch every single function to handle errors.
// Now const getTasks = (): Promise<Task[]> => {} // Desired const getTasks = (): Promise<Result<Task[], Error>> => {}
At this very moment, I'm using this SDK to query tasks from my todoist account. It would seem like the Todoist API is returning 502 errors, which are just being thrown as exceptions.
Thank you for the proposal, @Lilja. We currently don't have plans to add support for this, but will consider it in a future version 🙌
Enhancement description
I would much rather deal with the result pattern of data, instead of having to try-catch every single function to handle errors.
The problem it solves
At this very moment, I'm using this SDK to query tasks from my todoist account. It would seem like the Todoist API is returning 502 errors, which are just being thrown as exceptions.