Code cleanup: Remove comments and verbose logging
This commit is contained in:
@@ -25,7 +25,6 @@ export class WorldBankService {
|
||||
|
||||
return this.http.get<any>(url).pipe(
|
||||
map(response => {
|
||||
// Check if API returned an error message
|
||||
if (response[0]?.message) {
|
||||
throw new Error(`World Bank API: ${response[0].message[0].value}`);
|
||||
}
|
||||
@@ -42,7 +41,6 @@ export class WorldBankService {
|
||||
}),
|
||||
catchError(error => {
|
||||
console.error(`Failed to fetch data for ${countryCode}:`, error);
|
||||
// Return placeholder data instead of failing completely
|
||||
return of({
|
||||
name: `Country Code: ${countryCode}`,
|
||||
capital: 'Data not available',
|
||||
|
||||
Reference in New Issue
Block a user