export function getOwnErrorCode(error) {
    if (typeof error !== "object" ||
        error === null ||
        !Object.prototype.hasOwnProperty.call(error, "code")) {
        return undefined;
    }
    return error.code;
}
