question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

getUserData never hits 'User not found'

See original GitHub issue

In getUserData, my app never hits the ‘User not found’ error. The reason is because, in my results, total is the string "0", not the integer 0. See https://github.com/feathersjs/feathers-authentication-management/blob/master/src/helpers.js#L66

Is this something weird going on in my feather app or is this normal, and the code here should be updated to use an == or manually test both types?

Sample result for empty users query:

{ total: '0', limit: 10, skip: 0, data: [] }

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
cpsubriancommented, Apr 19, 2017

It turns out the database adapter returns strings in count queries, so I’d say the problem doesn’t lie in this module. Will file an issue over there.

0reactions
eddyystopcommented, Apr 19, 2017

Yes, I think that’s a bit too literal.

I’ve never heard of hook.result.total being a string. I don’t refer to it much myself though.

It would be fortunate if you can reproduce this consistently. I also think this occurs outside this repo.

I await your conclusions with baited breath. 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to get User's data - Stack Overflow
Suppose I have a column in my User table called 'test'. ... I'm changing the data via the Data Browser, not via the...
Read more >
3 Ways To Get User Data Without Ruining the User Experience
Learn From Buzzfeed: Use entertaining, interactive, shareable surveys. One of the most successful marketing websites ever, if not the most, is ...
Read more >
Need to get user data via API - WordPress Stack Exchange
I tried using the "Wordpress API with Basic authentication' method and I get the error: "missing 2 required positional arguments: 'consumer_key' ...
Read more >
Studio API Reference | Studio::EventInstance - FMOD
Studio::EventInstance::getUserData Retrieves the event instance user data. ... If the specified label is not found, FMOD_ERR_EVENT_NOTFOUND is returned.
Read more >
Maximum API request - Playfab Community
We made no changes to the game build. ... are: Each user can only hit GetUserData twice in a two-second period. ... (Could...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found