JS API Reference

Module: shared/utils/apiErrorMessage

Table of contents

Functions

Functions

getMessageFromApiError

getMessageFromApiError(error): string

Try to extract a message from a yagna API error. If the error is not an instance of ApiError, return the error message.

Parameters

NameType
errorunknown

Returns

string

Defined in

src/shared/utils/apiErrorMessage.ts:9