Better error handling when fetching access token