From a259a84d3f603d76be128b61622c81c014e23405 Mon Sep 17 00:00:00 2001 From: David Auza Date: Wed, 20 May 2020 15:36:13 -0500 Subject: [PATCH] docs(http): Remove extra semicolons in the http guide (#37228) An extra semicolon in searchHeroes function was removed in the http guide found in aio/content/guide/http.md docs(http): Remove extra semicolon in a code example found in the http guide Removed extra semicolon in handleError function in the file located at aio/content/examples/http/src/app/config/config.service.ts, which serves as a source of code examples for the http guide. Replace a comma for a dot in the comment at line 79 to ensure consistency with the rest of the document. Capitalized and added a dot at the end of the comment at line 84 to ensure consistency with the other comments. PR Close #37228 --- aio/content/examples/http/src/app/config/config.service.ts | 6 +++--- aio/content/guide/http.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/aio/content/examples/http/src/app/config/config.service.ts b/aio/content/examples/http/src/app/config/config.service.ts index 4dd71c69ab..e41c24f39c 100644 --- a/aio/content/examples/http/src/app/config/config.service.ts +++ b/aio/content/examples/http/src/app/config/config.service.ts @@ -76,15 +76,15 @@ export class ConfigService { console.error('An error occurred:', error.error.message); } else { // 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( `Backend returned code ${error.status}, ` + `body was: ${error.error}`); } - // return an observable with a user-facing error message + // Return an observable with a user-facing error message. return throwError( 'Something bad happened; please try again later.'); - }; + } // #enddocregion handleError makeIntentionalError() { diff --git a/aio/content/guide/http.md b/aio/content/guide/http.md index 410e0acd40..3605a9d871 100644 --- a/aio/content/guide/http.md +++ b/aio/content/guide/http.md @@ -277,7 +277,7 @@ searchHeroes(term: string): Observable { return this.http.jsonp(heroesUrl, 'callback').pipe( catchError(this.handleError('searchHeroes', [])) // then handle the error ); -}; +} ``` This request passes the `heroesURL` as the first parameter and the callback function name as the second parameter.