FriendsOfShopware / shopware-cli

CLI for Shopware Account and Shopware 6
MIT License
81 stars 32 forks source link

Image validation should tell us the path of the problematic image #294

Closed amenk closed 7 months ago

amenk commented 9 months ago

Please describe the feature you would like to see implemented.

$ shopware-cli account producer extension info push . --verbose
2024-01-18T09:34:59.421+0100    FATAL   cannot upload image to extension: AddExtensionImage: {"success":false,"code":"ValidatorException-5","detail":"The file does not fulfill the expected requirements.","context":[{"property":"file","errorMessage":"Der Dateityp ist ung\u00fcltig (\u0022image\/jpeg\u0022). Erlaubte Dateitypen sind \u0022image\/png\u0022.","code":"744f00bc-4389-4c74-92de-9a43cde55534"}]}

I was able to identify the image using "file *" and was having a .png which was indeed a .jpeg - but it would be nice if the error message would include the filename.

shyim commented 9 months ago

We should wrap the error in the cli with the file we are trying to upload