Why isn't failed a valid status returned by relayer.query function?

I'm using the query endpoint on relay in order to check the status of a sent transaction:

It looks like there's no failed status defined in the typescript library:
export declare type Status = 'pending' | 'sent' | 'submitted' | 'inmempool' | 'mined' | 'confirmed';

How do I check if a txn is in a failed state? It looks like the list endpoint as a failed status so I don't understand why the query endpoint wouldn't have it:

Hey @jg22, thanks for reporting.

Indeed, the Status type didn't include the failed status, which was a mistake on us and it's been addressed via this PR.

Nevertheless, you can list failed transactions as the .list(...) client method uses another type, which you can see here, and it includes the failed status.

Once merged and released, you'll be able to get it working properly.

best