fix(client-profile): handle missing profile image and remove skipErrorHandler usage

- Use standard HTTP error handling instead of skipErrorHandler
- Handle 404 errors gracefully in component as expected behavior
This commit is contained in:
JaySoni1
2025-09-04 13:49:51 +05:30
parent f1adfaf9e1
commit eb070974db
2 changed files with 15 additions and 7 deletions
+2 -3
View File
@@ -4,6 +4,7 @@ import { HttpClient, HttpParams } from '@angular/common/http';
/** rxjs Imports */
import { Observable } from 'rxjs';
/**
* Clients service.
*/
@@ -170,9 +171,7 @@ export class ClientsService {
getClientProfileImage(clientId: string) {
const httpParams = new HttpParams().set('maxHeight', '150');
return this.http
.skipErrorHandler()
.get(`/clients/${clientId}/images`, { params: httpParams, responseType: 'text' });
return this.http.get(`/clients/${clientId}/images`, { params: httpParams, responseType: 'text' });
}
uploadClientProfileImage(clientId: string, image: File) {