FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login

    I'm getting a 404 error when I'm searching for users?

    Scheduled Pinned Locked Moved Solved
    Q&A
    typescript client-library status code 404
    1
    2
    5.1k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • danD
      dan
      last edited by

      I'm using the FusionAuth typescript client and getting 404 errors when I search for users by email. What's going on?

      --
      FusionAuth - Auth for devs, built by devs.
      https://fusionauth.io

      1 Reply Last reply Reply Quote 0
      • danD
        dan
        last edited by

        404 is a valid response code when using the client library to look for a user by email.

        If the user exists you’ll get 200 and if the user does not exist you’ll get 404.

        If you are using the client in the browser and don’t want to expose the 404 to the console, adding a try/catch would be a good idea. The 404 is the expected response code when the user does not exist:
        https://fusionauth.io/docs/v1/tech/apis/users#response-2

        --
        FusionAuth - Auth for devs, built by devs.
        https://fusionauth.io

        1 Reply Last reply Reply Quote 0
        • First post
          Last post