You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 6, 2023. It is now read-only.
Currently blocked on this because Knex.js does not pass through the message from the trigger as its own property on the error object:
code: "ER_SIGNAL_EXCEPTION",errno: 1644,index: 0,sqlState: "45000",message: "insert into `rental` (`endDate`, `itemID`, `organizationID`, `startDate`, `userID`) values ('2017-05-10', '5', 37, '2017-05-02', 60) - ER_SIGNAL_EXCEPTION: Rental start date must not be in the past"
The message that I want is at the end of the actual message property.
Waiting on mysqljs/1714 to be merged. This will add a sqlMessage property containing the message associated with the sqlState, allowing direct pass-through of messages from triggers or procedures to end users.
Provides a second line of defense for the same validation in the frontend.
startDate
is not in the pastendDate
is after rent date by a preset minimum rental time (also checks thatendDate
is not in the past)The text was updated successfully, but these errors were encountered: