OwenKelvin/Angular-School-Management-System

View on GitHub
src/app/core/interceptors/error.interceptor.ts

Summary

Maintainability
A
2 hrs
Test Coverage

Function intercept has 58 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
        return next.handle(request).pipe(catchError(err => {
            const error = err.statusText || err.error.message;
            if (err.status === 500) {
                this.message = {
Severity: Major
Found in src/app/core/interceptors/error.interceptor.ts - About 2 hrs to fix

    There are no issues that match your filters.

    Category
    Status