docs: fix http example to show actual message in console (#42773)
Previously, the error message in the console would print `[object Object]` and not the actual error message. With this change, the error message is printed in the console. PR Close #42773
This commit is contained in:
parent
9ec241926e
commit
50b6aae029
|
@ -79,8 +79,7 @@ export class ConfigService {
|
||||||
// The backend returned an unsuccessful response code.
|
// The backend returned an unsuccessful response code.
|
||||||
// The response body may contain clues as to what went wrong.
|
// The response body may contain clues as to what went wrong.
|
||||||
console.error(
|
console.error(
|
||||||
`Backend returned code ${error.status}, ` +
|
`Backend returned code ${error.status}, body was: `, error.error);
|
||||||
`body was: ${error.error}`);
|
|
||||||
}
|
}
|
||||||
// Return an observable with a user-facing error message.
|
// Return an observable with a user-facing error message.
|
||||||
return throwError(
|
return throwError(
|
||||||
|
|
Loading…
Reference in New Issue