Skip to content

useCreate > onError returns callback function where error is "unknown" #11262

Description

@ogroppo

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"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions