Wider use of Either return type for API calls that may fail
From reddit: https://www.reddit.com/r/haskell/comments/ex7rny/gitlabhaskell_a_haskell_library_for_the_gitlab_api/fgbcqj5/
It would be useful if there was a way to tell whether an API request succeeded. Maybe if API endpoints returned Either GitlabError a instead of just a. We ran into this as an issue when attempting to download tar's from the API. Initially we misconfigured the authentication tokens so we were getting permission denied, but the error message was saved to output file instead of being available to us at runtime.
The API should be tested with incorrectly inputted access tokens, and with access tokens with insufficient permissions for the requested API calls. E.g. for the getFileArchive function in GitLab.API.Repositories.