Fix get user profile to correctly use user id if passed in
Add tests for error parsing