@linkedmink/node-route53-dynamic-dns
Version:
Background process that updates AWS Route 53 DNS address records whenever the public IP of the hosting environment changes
18 lines • 545 B
JavaScript
import { isNativeError } from "node:util/types";
import { isStringConvertable } from "./type-check.mjs";
export const formatError = (error) => {
if (isNativeError(error)) {
return error.stack ? error.stack : error.message;
}
else if (typeof error === "string") {
return error;
}
else if (isStringConvertable(error)) {
return error.toString();
}
else {
const stack = new Error().stack;
return `Unspecified Unhandled Error: ${stack}`;
}
};
//# sourceMappingURL=format.mjs.map