You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I tried to publish an asset with file attributes I got a "UnprocessableEntityError" error. Below is the code which I used to publish the asset. The complete error message can be found below as well. Please let me know how this issue can be addressed.
Hello,
When I tried to publish an asset with file attributes I got a "UnprocessableEntityError" error. Below is the code which I used to publish the asset. The complete error message can be found below as well. Please let me know how this issue can be addressed.
CODE
file_attributes = {
'fields': {
'file': {
'en-US': {
'fileName': 'products.jpg',
'contentType': 'image/jpg',
'url': 'https://cdn.shopify.com/s/files/1/2195/2237/products/P1010793_1000x.jpg?v=1594381279'}}}}
asset = client.assets(spaceid, envid).create('products007', file_attributes)
asset.publish()
ERROR
UnprocessableEntityError: HTTP status code: 422
Message: Validation error
Details:
* Name: hasHostname - Path: '['fields', 'file', 'en-US', 'url']' - Value: 'https://cdn.shopify.com/s/files/1/2195/2237/products/P1010793_1000x.jpg?v=1594381279'
Request ID: c72de457c1a85922aa292fce2d23ae67
The text was updated successfully, but these errors were encountered: