Closed triztian closed 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
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.