Deal with error in detail endpoint for invalid id.