Giter VIP home page Giter VIP logo

Comments (14)

h4kuna avatar h4kuna commented on August 27, 2024

What behavior do you expect? I haven't RuntimeException class in my library and nette throw JsonException. What do you have library for communication?

from fio.

Tetragramat avatar Tetragramat commented on August 27, 2024

It's psr 7 behavior this package is using.
https://github.com/php-fig/http-message/blob/master/src/StreamInterface.php#L140

from fio.

h4kuna avatar h4kuna commented on August 27, 2024

What behavior do you expect?

from fio.

Tetragramat avatar Tetragramat commented on August 27, 2024

I'm using Symfony\Component\HttpClient\Psr18Client symfony/http-client v6.4.8

The whole error is
[RuntimeException] Unable to read stream contents: Idle timeout reached for "https://fioapi.fio.cz/v1/rest/periods/REDACTED/2024-06-06/2024-06-06/transactions.json".

I would expect \h4kuna\Fio\Exceptions\ServiceUnavailable that should be thrown.

from fio.

Tetragramat avatar Tetragramat commented on August 27, 2024

What exactly happens is that Fio starts streaming response, but then timeout occurs. So status code is 200, but when you call getContents it returns timeout error with part of the response saved.

from fio.

h4kuna avatar h4kuna commented on August 27, 2024

Ok I understand. I saw to sentry on Fio, where we are using guzzle and i found.

h4kuna\Fio\Exceptions\ServiceUnavailable
 
/app/Finance/Fio/Services/FioService.php in App\Finance\Fio\Services\FioService::sinceDate

Level: Error
Idle timeout reached for "https://www.fio.cz/ib_api/rest/periods/REDACTED/2024-03-13/2024-03-13/transactions.json".

Because guzzle throw ClientExceptionInterface.

from fio.

h4kuna avatar h4kuna commented on August 27, 2024

Can you try dev-master a few weeks?

from fio.

Tetragramat avatar Tetragramat commented on August 27, 2024

It happen quite often so I can try it replicate locally, but probably earliest on monday.

from fio.

Tetragramat avatar Tetragramat commented on August 27, 2024

I can't use dev-master on production. Can't try locally too because the issue with fio was only 5-7th jun. Nothing since. I'll keep watch if it happens again in next days.

from fio.

Tetragramat avatar Tetragramat commented on August 27, 2024

Anyway looking at the fix 0406b9b, you should add test for this issue.

from fio.

Tetragramat avatar Tetragramat commented on August 27, 2024

It's happening again and so I tested master branch locally.

I got 200 with part of the response content and then timeout.
This library returned [h4kuna\Fio\Exceptions\ServiceUnavailable] Unable to read stream contents: Idle timeout reached for "REDACTED".

from fio.

h4kuna avatar h4kuna commented on August 27, 2024

Is it mean the right behaviour?

from fio.

Tetragramat avatar Tetragramat commented on August 27, 2024

yes, it works as expected.

from fio.

h4kuna avatar h4kuna commented on August 27, 2024

Released 3.0.10

from fio.

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.