Add error handling for api resource

This drops the loading state and also spits out an error to the console
which isn't wildly helpful, but it's better than a stick in the eye.