throw exception on receiving a resource with status set to `error`

Tag 0.5.5