public ActionResult <List <PetType> > GetFilteredType(string type) { try { return(Ok(_petTypeService.GetAllByType(type))); } catch (Exception) { return(StatusCode(500, "Smth Went Wrong")); } }
public ActionResult <PetType> GetFilteredPetTypes(string type) { var petType = _petTypeService.GetAllByType(type); try { return(Ok(petType)); } catch (Exception) { return(StatusCode(500, "Task failed successfully.")); } }
public ActionResult <PetType> GetFilteredPetTypes(string type) { var petType = _petTypeService.GetAllByType(type); try { return(Ok(petType)); } catch (Exception) { return(StatusCode(500, "Something went horribly wrong during execution. Rename please.")); } }