prodia-js icon indicating copy to clipboard operation
prodia-js copied to clipboard

Better Error Responses

Open montyanderson opened this issue 2 years ago • 0 comments

Currently errors look like this:

            throw new Error(`Bad Prodia Response: ${response.status}`);
                  ^

Error: Bad Prodia Response: 401
    at Object.generate (.../dist/prodia.js:20:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async ../index.js:8:14

Node.js v20.5.0

montyanderson avatar Aug 04 '23 12:08 montyanderson