// SPDX-License-Identifier: Apache-2.0
import LogService from "../../app/service/log/LogService";
export const LogError = (target, propertyKey, descriptor) => {
    const originalMethod = descriptor.value;
    descriptor.value = async function (...args) {
        try {
            const result = await originalMethod.apply(this, args);
            return result;
        }
        catch (error) {
            LogService.logError(error);
            throw error;
        }
    };
    return descriptor;
};
