Update the get_notification_by_id to return a sensible message if the id is not a valid UUID.

Previously "Result not found" would be returned when the id is not a valid uuid, which does not make sense.
Now the message says "notification_id is not a valid UUID", this should be a clearer message for the client service.
This commit is contained in:
Rebecca Law
2018-04-03 16:37:41 +01:00
parent c392053847
commit ecc4cde4de
3 changed files with 25 additions and 19 deletions

View File

@@ -20,6 +20,18 @@ template = {
"required": ["id", "version", "uri"]
}
notification_by_id = {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "GET notification response schema",
"type": "object",
"title": "response v2/notification",
"properties": {
"notification_id": uuid
},
"required": ["notification_id"]
}
get_notification_response = {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "GET notification response schema",