reorder functions for no-use-before-define

This commit is contained in:
Girish Ramakrishnan
2026-02-14 16:34:34 +01:00
parent 36aa641cb9
commit e9f96593c3
31 changed files with 2621 additions and 2648 deletions
+2 -2
View File
@@ -4,8 +4,6 @@ import assert from 'node:assert';
import { HttpError } from '@cloudron/connect-lastmile';
import util from 'node:util';
export default BoxError;
function BoxError(reason, errorOrMessage, extra = {}) {
assert.strictEqual(typeof reason, 'string');
assert(errorOrMessage instanceof Error || typeof errorOrMessage === 'string', `string: ${errorOrMessage} type: ${typeof errorOrMessage} json: ${JSON.stringify(errorOrMessage)}`);
@@ -111,3 +109,5 @@ BoxError.toHttpError = function (error) {
return new HttpError(500, error);
}
};
export default BoxError;