diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 782dac96e..2c99dfbfa 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -25,5 +25,5 @@ jobs: stale-pr-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days' stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days' exempt-issue-labels: 'feature,keep' - days-before-stale: 45 - days-before-close: 30 + days-before-stale: 60 + days-before-close: 60 diff --git a/README.md b/README.md index 9e85fa2d9..a5e813263 100644 --- a/README.md +++ b/README.md @@ -141,7 +141,7 @@ Refer to our [contributor documentation](CONTRIBUTING.md). ## Vulnerability Disclosures -Refer to our [vulnerability discolosure documentation](SECURITY.md) for submitting bugs. +Refer to our [Vulnerability Disclosure Documentation](SECURITY.md) for submitting bugs. ## Licensing diff --git a/app/api/v2/responses.py b/app/api/v2/responses.py index 278e4f07e..d1fc58c2a 100644 --- a/app/api/v2/responses.py +++ b/app/api/v2/responses.py @@ -1,5 +1,9 @@ +import json + from aiohttp import web from json import JSONDecodeError + +from aiohttp.web_exceptions import HTTPUnprocessableEntity from marshmallow.exceptions import ValidationError from app.api.v2 import errors @@ -51,9 +55,9 @@ async def apispec_request_validation_middleware(request, handler): ) except ValidationError as ex: # ex: List of objects sent when single object expected - raise JsonHttpBadRequest( - error='Error parsing JSON: Could not validate Schema', - details=str(ex) + formatted_message = json.dumps({"json": ex.messages}, indent=2) + raise HTTPUnprocessableEntity( + text=formatted_message ) except JSONDecodeError as ex: raise JsonHttpBadRequest(