-
Notifications
You must be signed in to change notification settings - Fork 724
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better http error handling #1253
Better http error handling #1253
Conversation
- Removed extra space after the parenthesis - Used camelCase for the methods name
typo/grammar
Fix display of Http Error Service link
Refactor notification.log(text, { addnCls: 'humane-flatty-error' }) into seperate method
**## javascript :)
Fix typo Fix call to displayError (allowing patch of displayError method in a decorator)
Test for Http Error Service
Add correct parameter in method 404 call. Add break in each case block
Add tests on displayError being called
I just added unit tests for |
1008d1f
to
87eabc3
Compare
Yes good remark. Indeed it should also be error.data.message. This was part of the original fix and has been reported a few time. |
No, test is not impacted, yet you should also change the mock to be as closest as possible from original behavior. :) |
@jpetitcolas more question. Your test wont go trough the HttpErrorHandler method. |
@Phocea: you're right: we need some unit tests on the handler too. If we want to test the whole part together, that's more end to end testing purpose in my opinion. That would be ideal, yet it is longer to implement, and not highly critical. I propose we don't block this PR for 1.0 release because of an E2E test lack. |
Agreed to, it's a one liner with no custom code. |
@Phocea, we prefer to have an equivalence between our tested and testing files. One code file, one test file. So, even if there is more bootstrap, yes, please, create another file. :) By the way, if you want to test an |
@jpetitcolas ok noted. |
Guys, can this be merged now ? |
What about the tests? |
@Kmaschta Unit test is done through HttpErrorServiceTest.spec.js |
@Phocea: some tests are failing on Travis:
I let you take a look on it? |
@jpetitcolas Gotcha. Sorry did not notice it was the unit test failing after the error.data.message change! |
@Kmaschta all good for you now ? Since Jonathan and myself pushed some commit I guess its down to you for the merge :) |
The E2E tests still failing ... but it's the cause of the protractor config this time. I'll check that soon. |
@Kmaschta Let me know if you want me to try rebasing again. I can only use GitHub right now so its a bit cumbersome, but dont mind updating my fork and resubmitting again if it helps |
We can change the target branch of this PR, we'll find a workaround. |
As discussed with @fzaninotto, reopening this PR. I have left the original implementation with a global delcared in the vendor.js since this is the solution I tested.
On latest build I am getting the error _.includes is not a function when navigating into one of my custom pages.
Following several threads on Restangular Git (one of them being mgonto/restangular#1225). I found out that Restangular is now compatible with lodash 4.
ng-admin using underscore is causing incompatibilty since the new webpack dependency version has been merged. Making use of lodash fixes the problems