belgattitude/httpx

View on GitHub
packages/exception/docs/api/experimental/functions/tryOrFail.md

Summary

Maintainability
Test Coverage
[**@httpx/exception**](../../README.md) • **Docs**

---

[@httpx/exception](../../README.md) / [experimental](../README.md) / tryOrFail

# Function: tryOrFail()

> **tryOrFail**\<`T`\>(`fn`): `Promise`\<`ReturnType`\<`T`\>\>

## Type Parameters

• **T** _extends_ `AsyncFn`\<`unknown`[], `unknown`\>

## Parameters

• **fn**: `T`

## Returns

`Promise`\<`ReturnType`\<`T`\>\>