justkd / AirpuckJS

AirpuckJS is a vanilla JS helper for Airtable. Does not require NodeJS or AirtableJS. Version 2.0 is a complete re-write. Background processess have been improved and general use has been simplified.
MIT License
15 stars 3 forks source link

Error Messages are Vague (and possibly other responses) #2

Open Hybridx24 opened 4 years ago

Hybridx24 commented 4 years ago

Hi!

I wanted to start off by saying this is an awesome project!

Having used it, I noticed that whenever I get an error with table.record(), I get a vague error message saying "4xx add error". This makes it very hard to diagnose any potential issues and would be much more effective if it included some context/cause for the error (which is provided by the Airtable response).

I was able to add the error information to the console error post by modifying line 100 in airpuck.js from: console.log(xhr.status) to console.log(xhr.status, JSON.parse(xhr.responseText)). I imagine this could be done for the other request types as well (UPDATE, DELETE, etc).

justkd commented 4 years ago

Hey sorry for the delay in responding. Thanks for the feedback. I actually have been adding more detailed logging to other projects. I'll make it a point to update this one in similar fashion.