Skip to content

Add fallback/cutoff to our backend calls similar to how we handle GitHub queries #3519

@sergeibbb

Description

@sergeibbb

handleException and requestExceptionCount etc. We should stop calling our APIs in a session if there’s a problem and X attempts in a row fail.

Details

Our calls to our gitkraken backend api don't have a lot of good handling right now - if the backend throws errors, we keep sending requests. We also don't always handle the errors very well.

In our integration code we have trackRequestException() and requestExceptionCount to stop hitting APIs like github after too many failed requests. We also have handleRequestError and handleException to more cleanly handle errors from github specifically, and would love the same for our backend error responses, though that is out-of-scope of this ticket.

We don't have a very good way, by comparison of handling exceptions from calls like fetchGkDevApi

Rate limiting

from #gkds-dev slack:
Currently we dont have this, we def will want to do this when we have public api's but right now we have the counts set high enough that they shouldnt really be hit unless you're doing something you shouldnt be doing.I believe if you do hit the rate limit you would get a 429, so something you could do for now is just stop calling our api for an hour if you get a 429.

moved from GLVSC-625

Metadata

Metadata

Assignees

Labels

area-pro-accountIssues or features related to Pro accounts

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions