Skip to content

Rename invalid to... something else? #7982

@Rich-Harris

Description

@Rich-Harris

Describe the problem

One side-note from #7956: invalid(422, {...}) is natural, but invalid(500, {...}) — which you need to do in order to show inline error UI along with repopulated form values — feels a bit weird. The error isn't that the data was invalid, it's that something went wrong on the back end.

Describe the proposed solution

Rename it to something that covers both 4xx and 5xx errors:

  • fail(status, data)
  • failed(status, data)
  • nope(status, data)

Suggestions welcome. (Note that we can't return error(status, data) because data must conform to App.Error in that case.

Alternatives considered

No response

Importance

nice to have

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions