Comments (4)
Specifically, in my case:
- When the provider hits the base API endpoint, I get an empty JSON array back
[]
with status200
. I take this to mean I have no company files associated with my account. - The methods in the provider all assume that I must have at least one company file, and so reach into the
raw_info
expecting data to be there. When there isn't any, it fails hard (NoMethodError
onnil
)
I should be able to recover from that and show an error message to my users, instead of a 500 with no visibility of what went wrong.
from omniauth-myob.
Should have time later this week to have a look, but feel free to submit a pull request in the mean time – thanks!
from omniauth-myob.
Finally had a chance to look into this.
Once you've authenticate against MYOB's API, you need a company file in order to access every other part of the API.
I think it makes sense to throw an exception that you're able to recover from gracefully. Thoughts?
from omniauth-myob.
Yes, I think that's the best solution. Maybe a name like NoCompanyFilesAvailableException
?
from omniauth-myob.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from omniauth-myob.