mirror of
https://github.com/bknd-io/bknd/
synced 2026-08-04 00:56:01 +00:00
Enhance Guard and Form components with improved error handling and debugging
- Added debug logging in the `Guard` class to track policy evaluations and conditions. - Updated error logging in the `Form` component to provide more context on invalid submissions. - Introduced state management for form errors in the `AuthRolesEdit` component, displaying alerts for invalid data submissions.
This commit is contained in:
@@ -130,7 +130,7 @@ export function Form<
|
||||
if (errors.length === 0) {
|
||||
await onSubmit(data as Data);
|
||||
} else {
|
||||
console.log("invalid", errors);
|
||||
console.error("form: invalid", { data, errors });
|
||||
onInvalidSubmit?.(errors, data);
|
||||
}
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user