Giter VIP home page Giter VIP logo

Comments (3)

matthew-altman avatar matthew-altman commented on July 24, 2024 1

@markschmid thanks for being invested enough to share your findings with us as we're working through this new client. I've updated the client-builder and regenerated the go-client with the suggested behavior. Thanks!

from go-client.

markschmid avatar markschmid commented on July 24, 2024

Great, thanks @matthew-altman ! For successful calls I'm getting now getting nil for errors and err.

E.g. for a call that results in 404 err and errors are still non-nil (EOF and &{map[] []} respectively). I suppose that's intended.

For errors, I can additionally check for empty struct/map besides nil, no problem. For err, can I assume EOF bears the same meaning nil in those cases?

from go-client.

matthew-altman avatar matthew-altman commented on July 24, 2024

@markschmid since there are lots of different reasons for failures there would probably be a lot of conditional checks that I could do to determine if/when to populate the err and errors. In your most recent example the err is probably returning an EOF since we're attempting to load the errors object with the response for a non successful call. However, a 404 wouldn't return validation errors. This is perhaps something we can address in a future iteration.

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.