Chore: Upgrade to Angular v18

Chore: Upgrade to Python 3.12
Chore: Upgrade to psycopg3
This commit is contained in:
2024-06-03 13:22:56 +05:30
parent 56c1be5e05
commit 010e9a84db
573 changed files with 5727 additions and 6528 deletions
+3 -6
View File
@@ -1,13 +1,11 @@
import { Injectable } from '@angular/core';
import { throwError } from 'rxjs';
import { Observable } from 'rxjs';
import { Observable, throwError } from 'rxjs';
@Injectable({
providedIn: 'root',
})
export class ErrorLoggerService {
public static log(serviceName = 'error-logger', message: string) {
// eslint-disable-next-line no-console
console.log(`${serviceName}Service: ${message}`);
}
@@ -18,11 +16,10 @@ export class ErrorLoggerService {
* @param operation - name of the operation that failed
* @param result - optional value to return as the observable result
*/
// eslint-disable-next-line @typescript-eslint/no-unused-vars, class-methods-use-this
public handleError<T>(serviceName = 'error-logger', operation = 'operation', result?: T) {
public handleError<T>(serviceName = 'error-logger', operation = 'operation') {
return (error: unknown): Observable<T> => {
ErrorLoggerService.log(serviceName, `${operation} failed: ${error}`);
return throwError(error);
return throwError(() => error);
};
}
}