Coder Social home page Coder Social logo

Comments (2)

prempador avatar prempador commented on August 20, 2024

Hello @fntc,
Thanks for taking the time and creating this issue.

As this was a very hot topic yesterday I will talk about this issue in detail here and link this comment from other issues.


General Answer and Statement

On Monday's deployment we added a rate limiter for the authentication endpoint, because we saw integrators sending a ton of requests against the authentication endpoint even after receiving a 401 error. As the authentication is shared across all of our APIs we are very cautious here, thus adding the limiter.

  • Yesterday after the first few people started testing again we saw that adding a request-limiter in a test-scenario resulted in integrators getting errors, most likely due to not optimal integration of our services, or bad implementation of their test-environment.
  • We also realized that the statusCode element returned by the rate-limiter was formatted differently than the status_code returned from our APIs, resulting in Exceptions from the fiskaly Client and the fiskaly-sdks.

As a result we disabled the rate-limiter for now, but we will add it back in as soon as we addressed the issues mentioned above. Most likely with a less strict number of maximum requests per minute.


Issue Specific Answer

Now to your specific scenario. Sending 1000 "Documents" at once, or directly following each other is not a realistic scenario. I know that you said that you just did it to create an export afterwards, but here the 429 Error is justifiable.
This openresty error comes from the Load-Balancer and we are aware that it returns HTML at the moment and are working on a fix.

We will look in a better handling of Exceptions and Errors that can occur, and we always welcome PRs if you want to take matters in you own hands.

Your proposal of an Error Code Enum is not realistic. Basically you should expect all errors mentioned in the API description, as well as errors that can be expected using a REST-API like: 400, 401, 429, 500, 501, ...

Best,
@prempador

from fiskaly-sdk-dotnet.

prempador avatar prempador commented on August 20, 2024

HTML Errors from the Backend will now be parsed to JSON Errors in the new v1.2.100.

If you are still experiencing issues please reopen this issue.

from fiskaly-sdk-dotnet.

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.