The compass error management was not good to understand what was happening under. It had some problems like doing a response.json when the status code is not 200, double-throw without needed in request/fetchGraphQL and the catch was for everything instead of more fine-grained problems. Now there is a custom error that will return GraphQL errors. Also, changed the use of any for unknown and remove the ts-ignore.
Type of change
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Documentation update (if none of the other choices apply)
Description
The compass error management was not good to understand what was happening under. It had some problems like doing a
response.json
when the status code is not 200, double-throw without needed in request/fetchGraphQL and the catch was for everything instead of more fine-grained problems. Now there is a custom error that will return GraphQL errors. Also, changed the use ofany
forunknown
and remove thets-ignore
.Type of change
Checklist