Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tidy message returned when specifying invalid PolicyData #823

Open
donaldgray opened this issue Apr 25, 2024 · 1 comment
Open

Tidy message returned when specifying invalid PolicyData #823

donaldgray opened this issue Apr 25, 2024 · 1 comment
Labels
API https://dlcs-book.readthedocs.io/en/latest/ bug Something isn't working jira marks issue for crossposting to JIRA

Comments

@donaldgray
Copy link
Member

Posting invalid policyData value when managing DeliveryChannelPolicy results in a 400 being returned but the error message contains unexpected values "" and "hydraDeliveryChannelPolicy" properties.

e.g. using "policyData": ["200,"] returned:

{
    "errors": {
        "": [
            "JsonToken EndArray is not valid for closing JsonType Object. Path '', line 4, position 24."
        ],
        "policyData": [
            "Unexpected character encountered while parsing value: [. Path 'policyData', line 4, position 17."
        ],
        "hydraDeliveryChannelPolicy": [
            "The hydraDeliveryChannelPolicy field is required."
        ]
    },
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "00-8491ee7970f67dbfb62a7dfe2d9fff53-73f594eb3b28831c-00"
}
@donaldgray donaldgray added bug Something isn't working API https://dlcs-book.readthedocs.io/en/latest/ jira marks issue for crossposting to JIRA labels Apr 25, 2024
@griffri griffri self-assigned this Apr 29, 2024
@donaldgray
Copy link
Member Author

Parking for now, issue with "" property seems to be related to general deserialization issue when model given incorrect type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API https://dlcs-book.readthedocs.io/en/latest/ bug Something isn't working jira marks issue for crossposting to JIRA
Projects
Status: Todo
Development

No branches or pull requests

2 participants