1
0
Fork 0

fix(server): use errors.Is() for error comparison

This commit is contained in:
Vojtěch Mareš 2024-05-11 20:25:04 +02:00
parent 4a58dc3a81
commit 040609b80d
Signed by: vojtech.mares
GPG key ID: C6827B976F17240D

View file

@ -524,7 +524,7 @@ func (h *APIHandlers) GetTrainingDateAttendeeCount(ctx context.Context, req GetT
func (h *APIHandlers) DeleteTrainingDateAttendee(ctx context.Context, req DeleteTrainingDateAttendeeRequestObject) (DeleteTrainingDateAttendeeResponseObject, error) {
err := h.trainingDateAttendeeRepository.Delete(req.TrainingDateAttendeeID)
if err == training.ErrTrainingDateAttendeeNotFound {
if errors.Is(err, training.ErrTrainingDateAttendeeNotFound) {
return DeleteTrainingDateAttendee404ApplicationProblemPlusJSONResponse{
NotFoundErrorApplicationProblemPlusJSONResponse: NotFoundErrorApplicationProblemPlusJSONResponse{
Status: fiber.StatusNotFound,