witoldsz / angular-http-auth

MIT License
2.37k stars 416 forks source link

Error when config doesn't exist, issue #118 #119

Closed witoldsz closed 8 years ago

pjfreeze commented 8 years ago

I'd love to see this merged in, are you waiting on anything in particular to merge in and create a release?

simison commented 8 years ago

@pjfreeze might be just requires thumbs up from me or you. :-) https://github.com/witoldsz/angular-http-auth/issues/118#issuecomment-155941049

Wanna test this? I'm on holidays.

witoldsz commented 8 years ago

@simison is right, I mean it would be great if you could confirm the new code fixes the issue.

pjfreeze commented 8 years ago

@simison @witoldsz Looks good to me. I've included 2 links, let me know if you have any questions or issues with that test case

Not working with version angular-http-auth#1.2.2 http://codepen.io/anon/pen/zvQBom

Working with angular-http-auth#issue-118 http://codepen.io/anon/pen/epazgK

I borrowed the test case from a comment on the related issue simison linked to from #118:

rcollette commented on Jul 17 Just to show where this scenario can occur without any other interceptors defined.

I had a case where a configured URL was not specified resulting in a null url parameter being passed to $http.post. The result is an infinite loading bar.

See example here: http://plnkr.co/edit/YhsWp7G4L1Gh93v1fsTJ?p=preview

simison commented 8 years ago

Thanks @witoldsz & @pjfreeze