npm package diff
Package: @forge/sql
Versions: 2.2.0 - 2.2.1-next.0
Modified:package/out/utils/error-handling.js
Index: package/out/utils/error-handling.js
===================================================================
--- package/out/utils/error-handling.js
+++ package/out/utils/error-handling.js
@@ -1,7 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.checkResponseError = exports.isForgeError = void 0;
+const errorCodes_1 = require("../errorCodes");
const errors_1 = require("../errors");
function isForgeError(body) {
if (typeof body === 'object' && body !== null) {
if ('code' in body && 'message' in body) {
@@ -15,17 +16,18 @@
if (response.ok) {
return;
}
const responseText = await response.text();
+ const traceId = response.headers.get('x-b3-traceid') || response.headers.get('x-trace-id');
const details = {
status: response.status,
statusText: response.statusText,
- traceId: response.headers.get('x-trace-id')
+ traceId
};
try {
const parsedBody = JSON.parse(responseText);
if (isForgeError(parsedBody)) {
- throw new errors_1.ForgeSQLAPIError(details, parsedBody, message);
+ throw new errors_1.ForgeSQLAPIError(details, parsedBody);
}
}
catch (error) {
if (error instanceof SyntaxError) {
@@ -33,7 +35,11 @@
else {
throw error;
}
}
- throw new errors_1.ForgeSQLAPIUnknownError(details, responseText, message);
+ throw new errors_1.ForgeSQLAPIError(details, {
+ code: errorCodes_1.errorCodes.UNKNOWN_ERROR,
+ message: message || 'Unexpected error in Forge SQL API request',
+ context: { responseText }
+ });
}
exports.checkResponseError = checkResponseError;
Modified:package/out/utils/__test__/error-handling.test.js
Index: package/out/utils/__test__/error-handling.test.js
===================================================================
--- package/out/utils/__test__/error-handling.test.js
+++ package/out/utils/__test__/error-handling.test.js
@@ -1,7 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const node_fetch_1 = require("node-fetch");
+const errorCodes_1 = require("../../errorCodes");
const errors_1 = require("../../errors");
const error_handling_1 = require("../error-handling");
describe('errorFromResponse', () => {
const traceId = 'trace-id';
@@ -28,40 +29,18 @@
}
catch (error) {
expect(error).toBeInstanceOf(errors_1.ForgeSQLAPIError);
expect(error).toMatchObject({
- status: 400,
- statusText: 'Bad Request',
- traceId,
+ responseDetails: {
+ status: 400,
+ statusText: 'Bad Request',
+ traceId
+ },
code,
- message,
- serverMessage: message
+ message
});
}
});
- it('should include custom message if provided', async () => {
- const customMessage = 'A custom message';
- const mockResponse = new node_fetch_1.Response(JSON.stringify({ code, message }), {
- status: 400,
- statusText: 'Bad Request',
- headers: { 'x-trace-id': traceId }
- });
- try {
- await (0, error_handling_1.checkResponseError)(mockResponse, customMessage);
- throw new Error('Expected error to be thrown');
- }
- catch (error) {
- expect(error).toBeInstanceOf(errors_1.ForgeSQLAPIError);
- expect(error).toMatchObject({
- status: 400,
- statusText: 'Bad Request',
- traceId,
- code,
- message: customMessage,
- serverMessage: message
- });
- }
- });
it('should include context if present in the Forge error', async () => {
const context = { key: 'value' };
const mockResponse = new node_fetch_1.Response(JSON.stringify({ code, message, context }), {
status: 400,
@@ -77,11 +56,13 @@
expect(error).toMatchObject({
code,
message,
context,
- status: 400,
- statusText: 'Bad Request',
- traceId
+ responseDetails: {
+ status: 400,
+ statusText: 'Bad Request',
+ traceId
+ }
});
}
});
it('should include top level additional fields if present in the Forge error', async () => {
@@ -100,11 +81,13 @@
expect(error).toMatchObject({
code,
message,
context: extraFields,
- status: 400,
- statusText: 'Bad Request',
- traceId
+ responseDetails: {
+ status: 400,
+ statusText: 'Bad Request',
+ traceId
+ }
});
}
});
it('should merge context and additional top level fields if both present in the Forge error', async () => {
@@ -124,11 +107,13 @@
expect(error).toMatchObject({
code,
message,
context: { ...context, ...extraFields },
- status: 400,
- statusText: 'Bad Request',
- traceId
+ responseDetails: {
+ status: 400,
+ statusText: 'Bad Request',
+ traceId
+ }
});
}
});
it('should include suggestion if present in the Forge error', async () => {
@@ -146,17 +131,19 @@
expect(error).toMatchObject({
code,
message,
suggestion,
- status: 400,
- statusText: 'Bad Request',
- traceId
+ responseDetails: {
+ status: 400,
+ statusText: 'Bad Request',
+ traceId
+ }
});
}
});
});
- describe('Unknown or not forge errors - ForgeSQLAPIUnknownError', () => {
- it('returns an ForgeSQLAPIUnknownError when no response body', async () => {
+ describe('Handle non forge errors - UNKNOWN_ERROR', () => {
+ it('returns an when no response body', async () => {
const mockResponse = new node_fetch_1.Response(undefined, {
status: 404,
statusText: 'Not Found',
headers: { 'x-trace-id': traceId }
@@ -165,18 +152,23 @@
await (0, error_handling_1.checkResponseError)(mockResponse);
throw new Error('Expected error to be thrown');
}
catch (error) {
- expect(error).toBeInstanceOf(errors_1.ForgeSQLAPIUnknownError);
+ expect(error).toBeInstanceOf(errors_1.ForgeSQLAPIError);
expect(error).toMatchObject({
- code: 'UNKNOWN_ERROR',
- status: 404,
- statusText: 'Not Found',
- traceId
+ code: errorCodes_1.errorCodes.UNKNOWN_ERROR,
+ context: {
+ responseText: ''
+ },
+ responseDetails: {
+ traceId,
+ status: 404,
+ statusText: 'Not Found'
+ }
});
}
});
- it("returns ForgeSQLAPIUnknownError if there is a JSON body that isn't a forge error", async () => {
+ it("returns UNKNOWN_ERROR if there is a JSON body that isn't a forge error", async () => {
const body = JSON.stringify({ not: 'a forge error' });
const mockResponse = new node_fetch_1.Response(body, {
status: 500,
statusText: 'Internal Server Error',
@@ -186,15 +178,19 @@
await (0, error_handling_1.checkResponseError)(mockResponse);
throw new Error('Expected error to be thrown');
}
catch (error) {
- expect(error).toBeInstanceOf(errors_1.ForgeSQLAPIUnknownError);
+ expect(error).toBeInstanceOf(errors_1.ForgeSQLAPIError);
expect(error).toMatchObject({
- code: 'UNKNOWN_ERROR',
- status: 500,
- statusText: 'Internal Server Error',
- responseText: body,
- traceId
+ code: errorCodes_1.errorCodes.UNKNOWN_ERROR,
+ context: {
+ responseText: body
+ },
+ responseDetails: {
+ traceId,
+ status: 500,
+ statusText: 'Internal Server Error'
+ }
});
}
});
});
Modified:package/out/errorCodes.js
Index: package/out/errorCodes.js
===================================================================
--- package/out/errorCodes.js
+++ package/out/errorCodes.js
@@ -1,8 +1,9 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.errorCodes = void 0;
exports.errorCodes = {
+ UNKNOWN_ERROR: 'UNKNOWN_ERROR',
SQL_EXECUTION_ERROR: 'SQL_EXECUTION_ERROR',
INVALID_SQL_QUERY: 'INVALID_SQL_QUERY',
QUERY_TIMED_OUT: 'QUERY_TIMED_OUT',
APP_NOT_ENABLED: 'APP_NOT_ENABLED'
Modified:package/out/errors.js
Index: package/out/errors.js
===================================================================
--- package/out/errors.js
+++ package/out/errors.js
@@ -1,42 +1,29 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
-exports.MigrationCheckPointError = exports.MigrationExecutionError = exports.ForgeSQLAPIError = exports.ForgeSQLAPIUnknownError = exports.ForgeSQLError = void 0;
+exports.MigrationCheckPointError = exports.MigrationExecutionError = exports.ForgeSQLAPIError = exports.ForgeSQLError = void 0;
class ForgeSQLError extends Error {
constructor(message) {
super(message);
this.name = 'ForgeSQLError';
}
}
exports.ForgeSQLError = ForgeSQLError;
-class ForgeSQLAPIUnknownError extends ForgeSQLError {
- code = 'UNKNOWN_ERROR';
- responseText;
- status;
- statusText;
- traceId;
- constructor(responseDetails, body, message) {
- super(message || 'Unexpected error in Forge SQL API request');
- this.code = 'UNKNOWN_ERROR';
- this.status = responseDetails.status;
- this.statusText = responseDetails.statusText;
- this.traceId = responseDetails.traceId;
- this.responseText = body;
- }
-}
-exports.ForgeSQLAPIUnknownError = ForgeSQLAPIUnknownError;
-class ForgeSQLAPIError extends ForgeSQLAPIUnknownError {
+class ForgeSQLAPIError extends ForgeSQLError {
+ responseDetails;
code;
- serverMessage;
+ message;
suggestion;
context;
- constructor(responseDetails, forgeError, message) {
- super(responseDetails, undefined, message || forgeError.message);
- const { code, message: serverMessage, suggestion, context = {}, ...additionalData } = forgeError;
+ constructor(responseDetails, forgeError) {
+ super(forgeError.message);
+ const { status, statusText, traceId } = responseDetails;
+ this.responseDetails = { status, statusText, traceId };
+ const { code, message, suggestion, context = {}, ...bodyData } = forgeError;
this.code = code;
- this.serverMessage = serverMessage;
+ this.message = message;
this.suggestion = suggestion;
- this.context = { ...context, ...additionalData };
+ this.context = { ...context, ...bodyData };
}
}
exports.ForgeSQLAPIError = ForgeSQLAPIError;
class MigrationExecutionError extends ForgeSQLError {
Modified:package/out/index.js
Index: package/out/index.js
===================================================================
--- package/out/index.js
+++ package/out/index.js
@@ -1,13 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
-exports.ForgeSQLAPIError = exports.ForgeSQLAPIUnknownError = exports.sql = exports.migrationRunner = exports.errorCodes = void 0;
+exports.ForgeSQLAPIError = exports.sql = exports.migrationRunner = exports.errorCodes = void 0;
const sql_1 = require("./sql");
Object.defineProperty(exports, "sql", { enumerable: true, get: function () { return sql_1.sql; } });
const errorCodes_1 = require("./errorCodes");
Object.defineProperty(exports, "errorCodes", { enumerable: true, get: function () { return errorCodes_1.errorCodes; } });
const errors_1 = require("./errors");
-Object.defineProperty(exports, "ForgeSQLAPIUnknownError", { enumerable: true, get: function () { return errors_1.ForgeSQLAPIUnknownError; } });
Object.defineProperty(exports, "ForgeSQLAPIError", { enumerable: true, get: function () { return errors_1.ForgeSQLAPIError; } });
const migration_1 = require("./migration");
Object.defineProperty(exports, "migrationRunner", { enumerable: true, get: function () { return migration_1.migrationRunner; } });
exports.default = sql_1.sql;
Modified:package/out/__test__/sql.test.js
Index: package/out/__test__/sql.test.js
===================================================================
--- package/out/__test__/sql.test.js
+++ package/out/__test__/sql.test.js
@@ -94,9 +94,9 @@
const mockResponse = new node_fetch_1.Response(JSON.stringify(forgeError), {
status: 400
});
mockFetch.mockResolvedValue(mockResponse);
- await expect(sqlClient.storageApi('INVALID SQL QUERY')).rejects.toThrow(new errors_1.ForgeSQLAPIError(mockResponse, forgeError));
+ await expect(sqlClient.storageApi('INVALID SQL QUERY')).rejects.toThrow(new errors_1.ForgeSQLAPIError({ status: mockResponse.status, statusText: mockResponse.statusText }, forgeError));
});
});
describe('prepare', () => {
it('should return a SqlStatement instance with query', () => {
Modified:package/package.json
Index: package/package.json
===================================================================
--- package/package.json
+++ package/package.json
@@ -1,7 +1,7 @@
{
"name": "@forge/sql",
- "version": "2.2.0",
+ "version": "2.2.1-next.0",
"description": "Forge SQL sdk",
"author": "Atlassian",
"license": "UNLICENSED",
"main": "out/index.js",
Modified:package/out/utils/error-handling.d.ts.map
Index: package/out/utils/error-handling.d.ts.map
===================================================================
--- package/out/utils/error-handling.d.ts.map
+++ package/out/utils/error-handling.d.ts.map
@@ -1,1 +1,1 @@
-{"version":3,"file":"error-handling.d.ts","sourceRoot":"","sources":["../../src/utils/error-handling.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAA2B,UAAU,EAA6C,MAAM,WAAW,CAAC;AAG3G,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,UAAU,CAO9D;AASD,wBAAsB,kBAAkB,CAAC,QAAQ,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAgC/F"}
\ No newline at end of file
+{"version":3,"file":"error-handling.d.ts","sourceRoot":"","sources":["../../src/utils/error-handling.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,OAAO,EAA2B,UAAU,EAAoB,MAAM,WAAW,CAAC;AAGlF,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,UAAU,CAO9D;AASD,wBAAsB,kBAAkB,CAAC,QAAQ,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAuC/F"}
\ No newline at end of file
Modified:package/out/errorCodes.d.ts.map
Index: package/out/errorCodes.d.ts.map
===================================================================
--- package/out/errorCodes.d.ts.map
+++ package/out/errorCodes.d.ts.map
@@ -1,1 +1,1 @@
-{"version":3,"file":"errorCodes.d.ts","sourceRoot":"","sources":["../src/errorCodes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;CAUb,CAAC"}
\ No newline at end of file
+{"version":3,"file":"errorCodes.d.ts","sourceRoot":"","sources":["../src/errorCodes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;CAYb,CAAC"}
\ No newline at end of file
Modified:package/out/errors.d.ts.map
Index: package/out/errors.d.ts.map
===================================================================
--- package/out/errors.d.ts.map
+++ package/out/errors.d.ts.map
@@ -1,1 +1,1 @@
-{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAGzC,MAAM,WAAW,UAAU;IAKzB,IAAI,EAAE,MAAM,CAAC;IAGb,OAAO,EAAE,MAAM,CAAC;IAGhB,UAAU,CAAC,EAAE,MAAM,CAAC;IAGpB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAGnC;AAGD,qBAAa,aAAc,SAAQ,KAAK;gBAC1B,OAAO,EAAE,MAAM;CAI5B;AAMD,MAAM,WAAW,uBAAwB,SAAQ,IAAI,CAAC,WAAW,EAAE,QAAQ,GAAG,YAAY,CAAC;IAEzF,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAOD,qBAAa,uBAAwB,SAAQ,aAAa;IACxD,IAAI,SAAmB;IAGvB,YAAY,CAAC,EAAE,MAAM,CAAC;IAGtB,MAAM,EAAE,MAAM,CAAC;IAGf,UAAU,EAAE,MAAM,CAAC;IAGnB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;gBAEZ,eAAe,EAAE,uBAAuB,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM;CAQtF;AAMD,qBAAa,gBAAiB,SAAQ,uBAAuB;IAK3D,IAAI,EAAE,MAAM,CAAC;IAEb,aAAa,EAAE,MAAM,CAAC;IAEtB,UAAU,CAAC,EAAE,MAAM,CAAC;IAGpB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;gBAEtB,eAAe,EAAE,uBAAuB,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,MAAM;CAU/F;AAED,qBAAa,uBAAwB,SAAQ,aAAa;IAEtD,QAAQ,CAAC,aAAa,EAAE,MAAM;IAC9B,QAAQ,CAAC,kBAAkB,EAAE,MAAM,EAAE;gBAD5B,aAAa,EAAE,MAAM,EACrB,kBAAkB,EAAE,MAAM,EAAE;CAIxC;AAED,qBAAa,wBAAyB,SAAQ,aAAa;IAEvD,QAAQ,CAAC,aAAa,EAAE,MAAM;IAC9B,QAAQ,CAAC,kBAAkB,EAAE,MAAM,EAAE;gBAD5B,aAAa,EAAE,MAAM,EACrB,kBAAkB,EAAE,MAAM,EAAE;CAIxC"}
\ No newline at end of file
+{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,UAAU;IAKzB,IAAI,EAAE,MAAM,CAAC;IAGb,OAAO,EAAE,MAAM,CAAC;IAGhB,UAAU,CAAC,EAAE,MAAM,CAAC;IAGpB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAGnC;AAGD,qBAAa,aAAc,SAAQ,KAAK;gBAC1B,OAAO,EAAE,MAAM;CAI5B;AASD,MAAM,WAAW,uBAAuB;IAEtC,MAAM,EAAE,MAAM,CAAC;IAGf,UAAU,EAAE,MAAM,CAAC;IAGnB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAMD,qBAAa,gBAAiB,SAAQ,aAAa;IAMjD,eAAe,EAAE,uBAAuB,CAAC;IAMzC,IAAI,EAAE,MAAM,CAAC;IAGb,OAAO,EAAE,MAAM,CAAC;IAGhB,UAAU,CAAC,EAAE,MAAM,CAAC;IAGpB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;gBAEtB,eAAe,EAAE,uBAAuB,EAAE,UAAU,EAAE,UAAU;CAgB7E;AAED,qBAAa,uBAAwB,SAAQ,aAAa;IAEtD,QAAQ,CAAC,aAAa,EAAE,MAAM;IAC9B,QAAQ,CAAC,kBAAkB,EAAE,MAAM,EAAE;gBAD5B,aAAa,EAAE,MAAM,EACrB,kBAAkB,EAAE,MAAM,EAAE;CAIxC;AAED,qBAAa,wBAAyB,SAAQ,aAAa;IAEvD,QAAQ,CAAC,aAAa,EAAE,MAAM;IAC9B,QAAQ,CAAC,kBAAkB,EAAE,MAAM,EAAE;gBAD5B,aAAa,EAAE,MAAM,EACrB,kBAAkB,EAAE,MAAM,EAAE;CAIxC"}
\ No newline at end of file
Modified:package/out/index.d.ts.map
Index: package/out/index.d.ts.map
===================================================================
--- package/out/index.d.ts.map
+++ package/out/index.d.ts.map
@@ -1,1 +1,1 @@
-{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,OAAO,KAAK,EAAE,MAAM,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEjE,YAAY,EAAE,MAAM,EAAE,mBAAmB,EAAE,CAAC;AAE5C,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,GAAG,EAAE,UAAU,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,CAAC;AAEnG,eAAe,GAAG,CAAC"}
\ No newline at end of file
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,OAAO,KAAK,EAAE,MAAM,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEjE,YAAY,EAAE,MAAM,EAAE,mBAAmB,EAAE,CAAC;AAE5C,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,GAAG,EAAE,UAAU,EAAE,gBAAgB,EAAE,CAAC;AAE1E,eAAe,GAAG,CAAC"}
\ No newline at end of file
Modified:package/out/errorCodes.d.ts
Index: package/out/errorCodes.d.ts
===================================================================
--- package/out/errorCodes.d.ts
+++ package/out/errorCodes.d.ts
@@ -1,5 +1,6 @@
export declare const errorCodes: {
+ readonly UNKNOWN_ERROR: "UNKNOWN_ERROR";
readonly SQL_EXECUTION_ERROR: "SQL_EXECUTION_ERROR";
readonly INVALID_SQL_QUERY: "INVALID_SQL_QUERY";
readonly QUERY_TIMED_OUT: "QUERY_TIMED_OUT";
readonly APP_NOT_ENABLED: "APP_NOT_ENABLED";
Modified:package/out/errors.d.ts
Index: package/out/errors.d.ts
===================================================================
--- package/out/errors.d.ts
+++ package/out/errors.d.ts
@@ -1,5 +1,4 @@
-import { APIResponse } from '@forge/api';
export interface ForgeError {
code: string;
message: string;
suggestion?: string;
@@ -7,25 +6,20 @@
}
export declare class ForgeSQLError extends Error {
constructor(message: string);
}
-export interface APIErrorResponseDetails extends Pick<APIResponse, 'status' | 'statusText'> {
- traceId?: string | null;
-}
-export declare class ForgeSQLAPIUnknownError extends ForgeSQLError {
- code: string;
- responseText?: string;
+export interface APIErrorResponseDetails {
status: number;
statusText: string;
traceId?: string | null;
- constructor(responseDetails: APIErrorResponseDetails, body?: string, message?: string);
}
-export declare class ForgeSQLAPIError extends ForgeSQLAPIUnknownError {
+export declare class ForgeSQLAPIError extends ForgeSQLError {
+ responseDetails: APIErrorResponseDetails;
code: string;
- serverMessage: string;
+ message: string;
suggestion?: string;
context?: Record<string, unknown>;
- constructor(responseDetails: APIErrorResponseDetails, forgeError: ForgeError, message?: string);
+ constructor(responseDetails: APIErrorResponseDetails, forgeError: ForgeError);
}
export declare class MigrationExecutionError extends ForgeSQLError {
readonly migrationName: string;
readonly migrationsYetToRun: string[];
Modified:package/out/index.d.ts
Index: package/out/index.d.ts
===================================================================
--- package/out/index.d.ts
+++ package/out/index.d.ts
@@ -1,9 +1,9 @@
import { sql } from './sql';
import { errorCodes } from './errorCodes';
-import { ForgeError, ForgeSQLAPIUnknownError, ForgeSQLAPIError } from './errors';
+import { ForgeError, ForgeSQLAPIError } from './errors';
import { migrationRunner } from './migration';
import type { Result, UpdateQueryResponse } from './utils/types';
export type { Result, UpdateQueryResponse };
-export { errorCodes, migrationRunner, sql, ForgeError, ForgeSQLAPIUnknownError, ForgeSQLAPIError };
+export { errorCodes, migrationRunner, sql, ForgeError, ForgeSQLAPIError };
export default sql;
//# sourceMappingURL=index.d.ts.map
\ No newline at end of file