Better failure handling in API
GET request handler