Giter VIP home page Giter VIP logo

Comments (3)

mooreds avatar mooreds commented on July 24, 2024

Hi @jizh6311 ,

Can you share some of the code that you wrote where this behavior was problematic?

I think I know what you ran into, but would love to see it from you just so I'm not making assumptions.

Here's the code that generates the go client library: https://github.com/FusionAuth/fusionauth-client-builder/blob/master/src/main/client/go.client.ftl#L22

from go-client.

jizh6311 avatar jizh6311 commented on July 24, 2024

Hi @jizh6311 ,

Can you share some of the code that you wrote where this behavior was problematic?

I think I know what you ran into, but would love to see it from you just so I'm not making assumptions.

Here's the code that generates the go client library: https://github.com/FusionAuth/fusionauth-client-builder/blob/master/src/main/client/go.client.ftl#L22

@mooreds Thanks for your reply! What I ran into was straightforward: when the apiKey was invalid, this code section was unable to get the unauthorized error. Instead, the error was nil.

  ...
  fusionAuthClient := NewClient(httpClient, baseURL, apiKey)
  groups, err := fusionAuthClient.RetrieveGroups()
  if err != nil {
    // log the errors
  } 

More specifically, I notice the error is void in the json for retrieveGroups: https://github.com/FusionAuth/fusionauth-client-builder/blob/3092673bc052942d430ba5c946824cac4352ed33/src/main/api/retrieveGroups.json, but it is Errors in some other json files: https://github.com/FusionAuth/fusionauth-client-builder/blob/3092673bc052942d430ba5c946824cac4352ed33/src/main/api/addUserToFamily.json#L9.

from go-client.

mooreds avatar mooreds commented on July 24, 2024

Yes, I was seeing that too. I think it might be because we always expect a response back from the groups API (unless, of course, the server is down or the API key is invalid). Will think about this a bit. Appreciate the response.

from go-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.