Added error handling by status