Describe the rate limit error everywhere

Fixes https://github.com/matrix-org/matrix-doc/issues/1153
pull/1373/head
Travis Ralston 6 years ago
parent eb0a8c06ce
commit 7cd22f5690

@ -72,7 +72,7 @@ paths:
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- Media - Media
"/download/{serverName}/{mediaId}": "/download/{serverName}/{mediaId}":
@ -119,7 +119,7 @@ paths:
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- Media - Media
"/download/{serverName}/{mediaId}/{fileName}": "/download/{serverName}/{mediaId}/{fileName}":
@ -173,7 +173,7 @@ paths:
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- Media - Media
"/thumbnail/{serverName}/{mediaId}": "/thumbnail/{serverName}/{mediaId}":
@ -238,7 +238,7 @@ paths:
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- Media - Media
"/preview_url": "/preview_url":
@ -293,6 +293,6 @@ paths:
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- Media - Media

@ -17,7 +17,9 @@ properties:
errcode: errcode:
type: string type: string
description: An error code. description: An error code.
example: M_UNKNOWN
error: error:
type: string type: string
description: A human-readable error message. description: A human-readable error message.
example: An unknown error occurred
required: ["errcode"] required: ["errcode"]

@ -0,0 +1,26 @@
# Copyright 2018 New Vector Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
$ref: error.yaml
type: object
description: The rate limit was reached for this request
properties:
errcode:
type: string
description: The M_LIMIT_EXCEEDED error code
example: M_LIMIT_EXCEEDED
error:
type: string
description: A human-readable error message.
example: Too many requests
required: ["errcode"]

@ -96,6 +96,6 @@ paths:
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- Room membership - Room membership

@ -113,7 +113,7 @@ paths:
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- Room membership - Room membership
"/join/{roomIdOrAlias}": "/join/{roomIdOrAlias}":
@ -209,6 +209,6 @@ paths:
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- Room membership - Room membership

@ -64,7 +64,7 @@ paths:
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- Room membership - Room membership
"/rooms/{roomId}/forget": "/rooms/{roomId}/forget":
@ -102,6 +102,6 @@ paths:
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- Room membership - Room membership

@ -61,7 +61,7 @@ paths:
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- Session management - Session management
post: post:
@ -176,6 +176,6 @@ paths:
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- Session management - Session management

@ -75,7 +75,7 @@ paths:
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- Presence - Presence
get: get:
@ -176,7 +176,7 @@ paths:
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- Presence - Presence
get: get:

@ -67,7 +67,7 @@ paths:
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- User data - User data
get: get:
@ -141,7 +141,7 @@ paths:
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- User data - User data
get: get:

@ -232,6 +232,6 @@ paths:
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- Push notifications - Push notifications

@ -442,7 +442,7 @@ paths:
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- Push notifications - Push notifications
"/pushrules/{scope}/{kind}/{ruleId}/enabled": "/pushrules/{scope}/{kind}/{ruleId}/enabled":

@ -76,6 +76,6 @@ paths:
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- Room participation - Room participation

@ -185,7 +185,7 @@ paths:
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- User data - User data
"/register/email/requestToken": "/register/email/requestToken":
@ -296,7 +296,7 @@ paths:
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- User data - User data
"/account/password/email/requestToken": "/account/password/email/requestToken":
@ -363,7 +363,7 @@ paths:
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- User data - User data
"/register/available": "/register/available":
@ -423,6 +423,6 @@ paths:
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- User data - User data

@ -355,6 +355,6 @@ paths:
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- Search - Search

@ -129,6 +129,6 @@ paths:
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- Room membership - Room membership

@ -82,6 +82,6 @@ paths:
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- Room participation - Room participation

@ -95,6 +95,6 @@ paths:
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- User data - User data

@ -73,6 +73,6 @@ paths:
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- VOIP - VOIP

@ -79,6 +79,6 @@ paths:
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- User data - User data

Loading…
Cancel
Save