Skip to content

Commit

Permalink
fix: change to getErrorMessage from handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
lemoonchild committed Nov 14, 2024
1 parent 17867d5 commit 51b9036
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sanitas_frontend/src/views/Appointments/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { colors, fonts, fontSize } from "src/theme.mjs";
import WrapPromise from "src/utils/promiseWrapper";
import ExpandingBaseInput from "src/components/Input/ExpandingBaseInput";
import { IS_PRODUCTION } from "src/constants.mjs";
import { getErrorMessage } from "src/utils/errorhandlerstoasts";

/**
* Provides a view for managing student appointments. This component is responsible for displaying
Expand Down Expand Up @@ -445,7 +446,7 @@ function StudentAppointmentsView({
setAddingNew(false);
setIsEditable(false);
} else {
toast.error(`Error al guardar: ${response.error}`);
toast.error(getErrorMessage(response, "cita"));
}
} catch (error) {
console.error("Error en la operación:", error);
Expand Down

0 comments on commit 51b9036

Please sign in to comment.