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

Not catch exception in asset.service create function #1246

Closed
ttournie opened this issue Nov 30, 2021 · 3 comments
Closed

Not catch exception in asset.service create function #1246

ttournie opened this issue Nov 30, 2021 · 3 comments
Assignees
Labels
type: bug 🐛 Something isn't working

Comments

@ttournie
Copy link
Contributor

Describe the bug
if there is an exception in the createAssetInternal function called in the create function of the asset.service, there is an error message saying that the error was not managed/catch.

To Reproduce
Steps to reproduce the behavior:

  1. Simply make the createAssetInternal function throw when calling create

Expected behavior
This error should be managed, the create function should reject.
You can fix that by adding a Try/catch in the create function around createAssetInternal and reject in the catch

Environment (please complete the following information):

  • @vendure/core version: 1.3.2
  • Nodejs : 14.17
  • Database postgres
@ttournie ttournie added the type: bug 🐛 Something isn't working label Nov 30, 2021
@michaelbromley
Copy link
Member

Thanks for the report. Do you have any idea what particular part of the asset creation process failed? Or is there no indication?

@ttournie
Copy link
Contributor Author

This is the error I get

error: Could not create Asset preview image: Input buffer contains unsupported image format

@michaelbromley
Copy link
Member

Perfect, thank you 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants