Closed svrcekmichal closed 8 years ago
@nmaves Please look at this suggestion. My idea is to take this changes and your #9 and make it version 1, because package is getting quite mature and used.
I think I like all of this. Having access to the full response in one place is a good idea as everyone is already familiar with an axios response.
I would like to simplify little bit default actions
onSuccess
andonError
. My suggestion is:PROS:
This is the proposed error handler:
Error handler will handle HTTP Failure and create generic action error if something bad occured. It will also handle logging to console if not production env is used. After little bit of googling I found that code 0 may represent various http failures.
PROS: