Skip to main content
Version: 5.x.x

Global Error

Usually, we can get a very specific type of error from the backend, so we can propagate its type between our requests.We do it during the setup of our client.

info

Remember to add the Error type, which is returned from internal errors like Canceled / Timeout / Unexpected Error.


Example

type GlobalErrors = Error | { message: string };

export const client = new Client<GlobalErrors>({ url });