Add exceptions to make API errors more handleable

Fix for #9 and #4 (didn't realize I created a dupe with 9, sorry.)