diff --git a/schemas/README-EDDN-schemas.md b/schemas/README-EDDN-schemas.md index c731ec4..9810dfb 100644 --- a/schemas/README-EDDN-schemas.md +++ b/schemas/README-EDDN-schemas.md @@ -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: ["]` - the JSON + + 4. `FAIL: Outdated Schema: ` - message cites a schema (or + version of) that is no longer supported. + + 6. `FAIL: ["]` - the JSON message failed to pass schema validation. e.g. ``` FAIL: [] ``` - 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 diff --git a/src/eddn/Gateway.py b/src/eddn/Gateway.py index a45f9c7..53c9981 100644 --- a/src/eddn/Gateway.py +++ b/src/eddn/Gateway.py @@ -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)