#11262·react-admin

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 Image

This is a useCreate

Image

Environment

  • React-admin version: "^5.9.2"