Closed jonathandean closed 1 year ago
a simple option seems to be adding these at the top of utils.rb
require 'errors/http_error'
require 'errors/permission_error'
require 'errors/service_error'
It's a bit odd that the message comes back as html but that's another thing
(Onfleet::PermissionError) gems/ruby-onfleet-1.0.2/lib/utils.rb:53:in `handle_api_error': status: 403, message: <html>
<head><title>403 Forbidden</title></head>
<body>
<center><h1>403 Forbidden</h1></center>
</body>
</html>
For reference this permission error was due to trying to access the staging environment endpoint. The same API key worked without specifying an endpoint and hence defaulting to the production API
NameError during attempt to retrieve the task list when auth permissions are incorrectly configured