Skip to content
Snippets Groups Projects
Commit 5c8536ff authored by Malte Finsterwalder's avatar Malte Finsterwalder
Browse files

HOLI-7493 handle 429 request exceededd via throwing an error

parent 7566f198
No related branches found
No related tags found
No related merge requests found
......@@ -23,7 +23,7 @@ export const authedFetchResponse = async (url: string, method: string, body?: ob
}
const response = await fetch(CHAT_SERVER_URL + url, init)
if (response.status == 429) {
return { status: response.status, json: { errcode: 'RATE_EXCEEDED', error: 'Rate exceeded' } }
throw new Error('Matrix request failed with status 429: Rate exceeded')
}
try {
const json = await response.json()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment