refactor: add message to named exception (#591)

This commit is contained in:
Jonathan Loscalzo 2023-04-24 03:54:07 -03:00 committed by GitHub
parent 9e7044c32c
commit 4d20b28070
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -159,8 +159,9 @@ export async function paginate<T extends ObjectLiteral>(
}
if (config.sortableColumns.length < 1) {
logger.debug("Missing required 'sortableColumns' config.")
throw new ServiceUnavailableException()
const message = "Missing required 'sortableColumns' config."
logger.debug(message)
throw new ServiceUnavailableException(message)
}
if (query.sortBy) {