Hi Broi, in case you're still looking for some help, just thought I'd share some code that might help you with error checking although it is very basic but might help you with how to use the callbacks that Daniel provided for return status and content. See below screenshot. Doesn't paste well with formatting. Happy to paste something you can copy-n-paste if this helps but might not be clean to look at.
