@telefonica/confluence-sync
Version:
Creates/updates/deletes Confluence pages based on a list of objects containing the page contents. Supports nested pages and attachments upload
15 lines (14 loc) • 583 B
JavaScript
;
// SPDX-FileCopyrightText: 2025 Telefónica Innovación Digital
// SPDX-License-Identifier: Apache-2.0
Object.defineProperty(exports, "__esModule", { value: true });
exports.getCauseMessage = getCauseMessage;
/**
* Returns the error message from the cause if it is an instance of Error, otherwise returns the cause itself.
* @param cause Cause of an error. It might be another error, or a string usually
* @returns The message to print
*/
function getCauseMessage(cause) {
/* istanbul ignore next */
return cause instanceof Error ? cause.message : cause;
}