import { catchError, map } from 'rxjs/operators';
const response = this.httpService
.get('https://abc.com/api/v2/branches')
.pipe(
map((response) => response.data),
catchError((e) => {
throw new HttpException(e.response.data, e.response.status);
}),
);
return response;
Last active
August 18, 2022 13:02
-
-
Save davistran86/4b36341ac36e474212788e854a02db59 to your computer and use it in GitHub Desktop.
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With promise