added error handler to GET