Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

sentry / @nestjs/websockets   js

Repository URL to install this package:

Version: 7.0.10 

/ context / exception-filters-context.js

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const constants_1 = require("@nestjs/common/constants");
const shared_utils_1 = require("@nestjs/common/utils/shared.utils");
const base_exception_filter_context_1 = require("@nestjs/core/exceptions/base-exception-filter-context");
const ws_exceptions_handler_1 = require("../exceptions/ws-exceptions-handler");
class ExceptionFiltersContext extends base_exception_filter_context_1.BaseExceptionFilterContext {
    constructor(container) {
        super(container);
    }
    create(instance, callback, moduleKey) {
        this.moduleContext = moduleKey;
        const exceptionHandler = new ws_exceptions_handler_1.WsExceptionsHandler();
        const filters = this.createContext(instance, callback, constants_1.EXCEPTION_FILTERS_METADATA);
        if (shared_utils_1.isEmpty(filters)) {
            return exceptionHandler;
        }
        exceptionHandler.setCustomFilters(filters.reverse());
        return exceptionHandler;
    }
    getGlobalMetadata() {
        return [];
    }
}
exports.ExceptionFiltersContext = ExceptionFiltersContext;