Skip to content

XRPC shouldn't throw on non-200 responses #27

Open
@mary-ext

Description

It's frankly annoying to have to handle happy and sad path separately in a try..catch, especially when they can be a quite common thing.

Let's avoid this, we should only throw on exceptional scenarios (e.g. unexpected content-type from #9)

We'll follow a similar response as oazapfts, like so:

const { status, data, headers } = await rpc.get('...');

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    breaking changeIssues that involve doing a breaking change

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions