hipsterjazzbo / LaraParse

LaraParse provides a nice integration for using Parse (parse.com) with Laravel 5+
MIT License
27 stars 19 forks source link

The app will crash due to an uncaught exception in `ParseUserProvider->retrieveById()` #33

Closed triztian closed 9 years ago

triztian commented 9 years ago

Add null return value for when the Parse user has been deleted and the session has not been closed.

Although that scenario won't happen frequently on production, during development and testing of registration of user accounts it happens a lot.

Basically, the parse query will throw an exception if the ParseObject with the given id does not exist, if that happens we return null.

nicklee1990 commented 9 years ago

Also, from memory doesn't Parse return empty arrays when an object isn't found? Furthermore, this code just catches a generic Parse Exception. What if an exception is thrown for some other reason? The above code would return null implying the user wasn't found which may not be the case, there could be a Parse Client exception