Skip to content

Commit c36a4d2

Browse files
committed
feat(cardano-services-client): increase details for cardano-submit-api txs submission errors
1 parent 21e1863 commit c36a4d2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/cardano-services-client/src/TxSubmitProvider/TxSubmitApiProvider.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,11 @@ export class TxSubmitApiProvider implements TxSubmitProvider {
4343

4444
if (typeof status === 'number' && status >= 400 && status < 500) this.#healthStatus = true;
4545

46-
throw new ProviderError(ProviderFailure.BadRequest, mapCardanoTxSubmitError(data), data as string);
46+
throw new ProviderError(
47+
ProviderFailure.BadRequest,
48+
mapCardanoTxSubmitError(data),
49+
typeof data === 'string' ? data : JSON.stringify(data)
50+
);
4751
}
4852

4953
throw new ProviderError(ProviderFailure.Unknown, error, 'submitting tx');

0 commit comments

Comments
 (0)