Skip to content

Uncaught (in promise) by calling useSWRMutation trigger function #2376

@peresleguine

Description

@peresleguine

Bug report

Description / Observed Behavior

Uncaught error is thrown inside the fetcher function by triggering useSWRMutation.

Expected Behavior

Error should be caught by SWR and returned as an error object like it happens in useSWR hook.

Repro Steps / Code Example

CodeSandbox

Additional Context

SWR version: 2.0.1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions