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 response body may contain clues as to what went wrong.
|
||||
console.error(
|
||||
`Backend returned code ${error.status}, ` +
|
||||
`body was: ${error.error}`);
|
||||
`Backend returned code ${error.status}, body was: `, error.error);
|
||||
}
|
||||
// Return an observable with a user-facing error message.
|
||||
return throwError(
|
||||
|
|
Loading…
Reference in New Issue