Gateway/errors: Outdate Schema: Tweak message and document

This commit is contained in:
Athanasius 2022-01-09 15:48:27 +00:00
parent e931bfff96
commit e111fb8415
No known key found for this signature in database
GPG Key ID: AE3E527847057C7D
2 changed files with 8 additions and 3 deletions

View File

@ -325,14 +325,18 @@ make a valid request" responses you might experience the following:
```
FAIL: JSON parsing: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)
```
4. `FAIL: [<ValidationError: "<schema validation failure>"]` - the JSON
4. `FAIL: Outdated Schema: <detail>` - message cites a schema (or
version of) that is no longer supported.
6. `FAIL: [<ValidationError: "<schema validation failure>"]` - the JSON
message failed to pass schema validation. e.g.
```
FAIL: [<ValidationError: "'StarPos' is a required property">]
```
5. Other python exception message, e.g. if a message appeared to be
6. Other python exception message, e.g. if a message appeared to be
gzip compressed, but a failure was experienced when attempting to
decompress it. **NB: As of 2022-07-01 such messages won't have the
`FAIL: ` prefix.** See

View File

@ -223,7 +223,8 @@ def parse_and_error_handle(data):
if parsed_message["$schemaRef"] in Settings.GATEWAY_OUTDATED_SCHEMAS:
response.status = '426 Upgrade Required' # Bottle (and underlying httplib) don't know this one
statsCollector.tally("outdated")
return "FAIL: The schema you have used is no longer supported. Please check for an updated version of your application."
return "FAIL: Outdated Schema: The schema you have used is no longer supported. Please check for an updated " \
"version of your application."
validationResults = validator.validate(parsed_message)