ChiriVulpes / scryfall-sdk

A Node.js SDK for https://scryfall.com/docs/api, written in TypeScript.
MIT License
99 stars 16 forks source link

Allow queryApi function to return Error Object #9

Closed dantolini closed 6 years ago

dantolini commented 6 years ago

The Scryfall api provides nice, human readable error messages (https://scryfall.com/docs/api/errors), but these are being swallowed by queryApi, which will return { data: [] } on an error. By allowing the error object to be returned (or at least retrieved), a program can report to the user problems with the query.

ChiriVulpes commented 6 years ago

Thanks for the report! This is implemented as of v1.3.1