How can I simulate HTTP error response in Angular service? I often need to handle different HTTP error codes and sometimes I need implement solution, but backend is not ready. How can I mock errors from backend? Example code
public getData(): Observable<Response> {
return this.httpClient.get<Response>(`${this.endpoint}`);
}