decentraland / decentraland/builder-client
Detecting wearable.json errors is cumbersome
- Dominant language
- TypeScript
- Stars
- 3
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
## 🎉 Description
When loading a new zip file using `loadFile`, if the wearable.json configuration is invalid, the error thrown is: `InvalidWearableConfigFileError`. The thing is that the errors are a bit hidden behind `error.getErrors()` "forcing" the client user to do something like this:
```ts
if (error instanceof InvalidWearableConfigFileError) {
throw new Error(`${error.message}. Errors: ${JSON.stringify(error.getErrors())}`)
}
```
if wanting to show a meaningful error message.
Could it be possible to have a better error message? or maybe handle this in another way (the error is just AJV gibberish)
- [ ] 🐛 This is a bug report.
- [x] 📈 This is a feature request.
Contributor guide
Assessment
This issue has not been assessed yet.