Skip to content

Song request response should return timeout duration remaining #237

@kenellorando

Description

@kenellorando

When a call to /api/request/id or api/request/bestmatch is made, the body should return a TimeRemaining field representing the rounded integer seconds until they can make another request.

For example, if the server administrator sets a timeout of 180, and the user tries to make a request five seconds after they just made their first request, the response field of the code 429 should include TimeRemaining: 175.

This would enable us to do things like have the UI disable and re-enable the request buttons automatically, and allow other clients like CadenceBot to report to users how much longer they have to wait until they can make another request. We had this feature in v4, so this issue will mostly be a re-implementation on the new Redis rate limit database.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions