useCreate > onError returns callback function where error is "unknown"
Author: ogroppoCreated May 18, 2026Updated Jul 31, 2026
What you were expecting:
onError should have callback function with same signature as useUpdate i.e. (error: Error) => void not (error: unkonwn) => void)
What happened instead: Error needs to be casted only for some hooks
Steps to reproduce:
This is a useUpdate
This is a useCreate
Environment
- React-admin version: "^5.9.2"
Source: marmelab/react-admin