question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Validation errors raised for valid response

See original GitHub issue

When I search the catalog for product ID 9P29XK3N9SVQ (Assassin’s Creed Valhalla + Watch Dogs: Legion Bundle) the following error is raised:

pydantic.error_wrappers.ValidationError: 2 validation errors for CatalogResponse
Products -> 0 -> ValidationData -> ValidationResultUri
  none is not an allowed value (type=type_error.none.not_allowed)
Products -> 0 -> DisplaySkuAvailabilities -> 0 -> Sku -> Properties -> FulfillmentType
  none is not an allowed value (type=type_error.none.not_allowed)

However, when inspecting the raw api response, it seems to work fine. So, I think the validations are a little too restricted for the above values.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
Landcrosscommented, Dec 18, 2020

Sure, it should be available now in #41 . I had modified the models.py file locally already anyway. I’m not exactly too familiar with pull-requests, so I hope it all went well 😃

0reactions
tuxusercommented, Dec 18, 2020

Thanks for your report, testing and detailed error messages. Could you send a PR?

Simply edit the fields to be Optional[type] but you probably know that already 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

A Better Way to Handle Validation Errors - Kevin Smith
Another common technique is to bundle up all the validation errors and return them in some sort of payload—an array, a custom Errors...
Read more >
django - How to raise a ValidationError AND return a response?
To validate such cases, you should use clean() method of a form, rather than raising an error in the view.
Read more >
Form validation and error handling - IU KB - Indiana University
Client-side validation can help identify errors before the form is submitted, but the interruptions from error messages can also be distracting ...
Read more >
Validation errors - Oracle Help Center
Validation errors typically occur when a request is malformed -- usually because a field has not been given the correct value type, or...
Read more >
Improve Validation Errors with Adaptive Messages
Validation errors won't ever be eliminated – they are a natural part of complex forms and user inputs. In this article we share...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found