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
By default, the Marten::Handlers::Defaults::Debug::ServerError handler (which is called when an unhandled exception is raised in development) displays only the message of the showcased exception, which does not help much in case of Marten::DB::Errors::InvalidRecord exceptions (which are raised when trying to save invalid model records).
Let's implement a special case in order to ensure that validation error details are surfaced for these exceptions in this debug page. In this light, we could probably iterate over the error set (instance of Marten::Core::Validation::ErrorSet) for the considered record and display for each error the corresponding field and message.
The text was updated successfully, but these errors were encountered:
Description
By default, the
Marten::Handlers::Defaults::Debug::ServerError
handler (which is called when an unhandled exception is raised in development) displays only the message of the showcased exception, which does not help much in case ofMarten::DB::Errors::InvalidRecord
exceptions (which are raised when trying to save invalid model records).Let's implement a special case in order to ensure that validation error details are surfaced for these exceptions in this debug page. In this light, we could probably iterate over the error set (instance of
Marten::Core::Validation::ErrorSet
) for the considered record and display for each error the corresponding field and message.The text was updated successfully, but these errors were encountered: