Menu
Feedback
Start here
Tutorials
Developer portal

Known Issues
Support Rules
Troubleshooting

Frequently Asked Questions
Announcements
Known issues
Catalog Brand API REST allows the client to break the information if sending request with wrong values
Catalog Brand API REST allows the client to break the information if sending request with wrong values
ID: 269109
Fixed
Published on 3/10/2023
Last update on 5/11/2023

Summary

There are a lot of routes that support some type of value, but if the costumer uses another type of value (for example, insert null instead of boolean) can broke the product / SKU / category / brand interface. Denying the client to update the information through admin.

Simulation

For the routes api/catalog/pvt/brand?an=or /api/catalog/pvt/brand/?an=, the documentation says that the field MenuHome only accepts boolean values. But if we send a request with "null" for example, the route will return a 200 and we are able ti insert this value. After this, if we try to edit the brand on the admin interface, we will not be able. It will return a Something Went Wrong error with the exception_message="Object cannot be cast from DBNull to other types."

Workaround

Update the information again, through the API.

Contributors
2
Photo of the contributor
Photo of the contributor
+ 2 contributors
Contributors
2
Photo of the contributor
Photo of the contributor
+ 2 contributors
On this page
Still got questions?
Ask the community
Find solutions and share ideas in the VTEX community.
Join our community
Request support from VTEX
For personalized assistance, contact our experts.
Open a support ticket
GithubDeveloper portalCommunityFeedback