From 90d71c1e1ae60994c0fb4d0b42c22b55fece239f Mon Sep 17 00:00:00 2001 From: Ilya Shevchenko Date: Wed, 15 Mar 2023 19:38:10 +0400 Subject: [PATCH] feat: add error code number --- src/errors.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/errors.ts b/src/errors.ts index dbc3bc1c..0cb2f4e9 100644 --- a/src/errors.ts +++ b/src/errors.ts @@ -54,7 +54,7 @@ export class YdbError extends Error { if (!ErrCls) { throw new Error(`Unexpected status code ${status}!`); } else { - throw new ErrCls(`${ErrCls.name}: ${YdbError.formatIssues(operation.issues)}`, operation.issues); + throw new ErrCls(`${ErrCls.name} (code ${status}): ${YdbError.formatIssues(operation.issues)}`, operation.issues); } } }