Giter VIP home page Giter VIP logo

Comments (3)

atipugin avatar atipugin commented on June 12, 2024

Hey @AlexWayfer

Sounds interesting. Could you make some POC branch/PR for this? Just to play around and understand if it's convenient or not.

Another detail about I'm not sure: should I check response['ok'] or response.status == 200 is enough? Can there be a response with status 200, but without result (with error)? I haven't found any info about this in the documentation.

Docs don't mention anything about status code, so i'd not rely on it and keep using ok flag.

from telegram-bot-ruby.

AlexWayfer avatar AlexWayfer commented on June 12, 2024

Sounds interesting. Could you make some POC branch/PR for this? Just to play around and understand if it's convenient or not.

Yeah, I think about it. I don't think it'd take a lot of change lines. I'd like to do this with specs, but right now I have issues with logging into test environment…

Docs don't mention anything about status code, so i'd not rely on it and keep using ok flag.

I wouldn't like to do so: any 4xx or 5xx error can have no ok field, even not JSON. We should have a double check there, or just rely on 200 — that's my quesiton.

from telegram-bot-ruby.

AlexWayfer avatar AlexWayfer commented on June 12, 2024

Docs don't mention anything about status code, so i'd not rely on it and keep using ok flag.

I wouldn't like to do so: any 4xx or 5xx error can have no ok field, even not JSON. We should have a double check there, or just rely on 200 — that's my quesiton.

I've tested simple 400 errors — there is correct HTTP status, so I'd rely on it for now, and let's monitor. If we will catch cases with HTTP 200 and ok => false — it'd be very strange and we can investigate and fix it more proper.

from telegram-bot-ruby.

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.