Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia
TypeScript apiapi-clientapi-restapi-testingdeveloper-toolsgraphqlhttphttp-clientpwarestrest-apispatestingtesting-toolstoolsvuevuejswebsocket
chore: serialize when logging errors (#2775)
Akash K971238cedb28
diff --git a/packages/hoppscotch-app/src/helpers/teams/TeamCollectionAdapter.ts b/packages/hoppscotch-app/src/helpers/teams/TeamCollectionAdapter.tsindex ae85144d4..49a891bde 100644--- a/packages/hoppscotch-app/src/helpers/teams/TeamCollectionAdapter.ts+++ b/packages/hoppscotch-app/src/helpers/teams/TeamCollectionAdapter.ts@@ -470,7 +470,9 @@ export default class NewTeamCollectionAdapter {this.teamCollectionAdded$ = teamCollAdded$.subscribe((result) => {if (E.isLeft(result))- throw new Error(`Team Collection Added Error: ${result.left}`)+ throw new Error(+ `Team Collection Added Error: ${JSON.stringify(result.left)}`+ )this.addCollection({@@ -493,7 +495,9 @@ export default class NewTeamCollectionAdapter {this.teamCollectionUpdatedSub = teamCollUpdatedSubthis.teamCollectionUpdated$ = teamCollUpdated$.subscribe((result) => {if (E.isLeft(result))- throw new Error(`Team Collection Updated Error: ${result.left}`)+ throw new Error(+ `Team Collection Updated Error: ${JSON.stringify(result.left)}`+ )this.updateCollection({id: result.right.teamCollectionUpdated.id,@@ -511,7 +515,9 @@ export default class NewTeamCollectionAdapter {this.teamCollectionRemovedSub = teamCollRemovedSubthis.teamCollectionRemoved$ = teamCollRemoved$.subscribe((result) => {if (E.isLeft(result))- throw new Error(`Team Collection Removed Error: ${result.left}`)+ throw new Error(+ `Team Collection Removed Error: ${JSON.stringify(result.left)}`+ )this.removeCollection(result.right.teamCollectionRemoved)})@@ -526,7 +532,9 @@ export default class NewTeamCollectionAdapter {this.teamRequestAddedSub = teamReqAddedSubthis.teamRequestAdded$ = teamReqAdded$.subscribe((result) => {if (E.isLeft(result))- throw new Error(`Team Request Added Error: ${result.left}`)+ throw new Error(+ `Team Request Added Error: ${JSON.stringify(result.left)}`+ )this.addRequest({id: result.right.teamRequestAdded.id,@@ -548,7 +556,9 @@ export default class NewTeamCollectionAdapter {this.teamRequestUpdatedSub = teamReqUpdatedSubthis.teamRequestUpdated$ = teamReqUpdated$.subscribe((result) => {if (E.isLeft(result))- throw new Error(`Team Request Updated Error: ${result.left}`)+ throw new Error(+ `Team Request Updated Error: ${JSON.stringify(result.left)}`+ )this.updateRequest({id: result.right.teamRequestUpdated.id,@@ -568,7 +578,9 @@ export default class NewTeamCollectionAdapter {this.teamRequestUpdatedSub = teamReqDeletedthis.teamRequestDeleted$ = teamReqDeleted$.subscribe((result) => {if (E.isLeft(result))- throw new Error(`Team Request Deleted Error ${result.left}`)+ throw new Error(+ `Team Request Deleted Error ${JSON.stringify(result.left)}`+ )this.removeRequest(result.right.teamRequestDeleted)})diff --git a/packages/hoppscotch-app/src/helpers/teams/TeamListAdapter.ts b/packages/hoppscotch-app/src/helpers/teams/TeamListAdapter.tsindex 16db0acb1..de9c52803 100644--- a/packages/hoppscotch-app/src/helpers/teams/TeamListAdapter.ts+++ b/packages/hoppscotch-app/src/helpers/teams/TeamListAdapter.ts@@ -65,7 +65,9 @@ export default class TeamListAdapter {if (E.isLeft(result)) {this.error$.next(result.left)- throw new Error(`Failed fetching teams list: ${result.left}`)+ throw new Error(+ `Failed fetching teams list: ${JSON.stringify(result.left)}`+ )}results.push(...result.right.myTeams)