{
- this.$toast.error(this.$t("something_went_wrong"), {
+ .catch((e) => {
+ this.$toast.error(this.$t("error.something_went_wrong"), {
icon: "error",
})
- console.log(error)
+ console.error(e)
})
},
async readEnvironmentGist() {
@@ -159,9 +159,9 @@ export default {
replaceEnvironments(environments)
this.fileImported()
})
- .catch((error) => {
+ .catch((e) => {
this.failedImport()
- console.log(error)
+ console.error(e)
})
},
hideModal() {
diff --git a/components/firebase/Login.vue b/components/firebase/Login.vue
index c71c581f2..55afe7120 100644
--- a/components/firebase/Login.vue
+++ b/components/firebase/Login.vue
@@ -183,16 +183,16 @@ export default {
}
this.showLoginSuccess()
- } catch (err) {
- console.log(err)
+ } catch (e) {
+ console.error(e)
// An error happened.
- if (err.code === "auth/account-exists-with-different-credential") {
+ if (e.code === "auth/account-exists-with-different-credential") {
// Step 2.
// User's email already exists.
// The pending Google credential.
- const pendingCred = err.credential
+ const pendingCred = e.credential
// The provider account's email address.
- const email = err.email
+ const email = e.email
// Get sign-in methods for this email.
const methods = await getSignInMethodsForEmail(email)
@@ -259,16 +259,16 @@ export default {
}
this.showLoginSuccess()
- } catch (err) {
- console.log(err)
+ } catch (e) {
+ console.error(e)
// An error happened.
- if (err.code === "auth/account-exists-with-different-credential") {
+ if (e.code === "auth/account-exists-with-different-credential") {
// Step 2.
// User's email already exists.
// The pending Google credential.
- const pendingCred = err.credential
+ const pendingCred = e.credential
// The provider account's email address.
- const email = err.email
+ const email = e.email
// Get sign-in methods for this email.
const methods = await getSignInMethodsForEmail(email)
@@ -322,7 +322,8 @@ export default {
this.mode = "email-sent"
setLocalConfig("emailForSignIn", this.form.email)
})
- .catch((error) => {
+ .catch((e) => {
+ console.error(e)
this.$toast.error(error.message, {
icon: "error",
})
diff --git a/components/firebase/Logout.vue b/components/firebase/Logout.vue
index 41515f8f1..b72c45db4 100644
--- a/components/firebase/Logout.vue
+++ b/components/firebase/Logout.vue
@@ -35,8 +35,9 @@ export default Vue.extend({
this.$toast.info(this.$t("logged_out").toString(), {
icon: "vpn_key",
})
- } catch (err) {
- this.$toast.show(err.message || err, {
+ } catch (e) {
+ console.error(e)
+ this.$toast.error(this.$t("error.something_went_wrong").toString(), {
icon: "error",
})
}
diff --git a/components/graphql/QueryEditor.vue b/components/graphql/QueryEditor.vue
index a81eaef7f..84838a9b2 100644
--- a/components/graphql/QueryEditor.vue
+++ b/components/graphql/QueryEditor.vue
@@ -171,7 +171,7 @@ export default {
try {
this.$emit("update-query", gql.print(gql.parse(this.editor.getValue())))
} catch (e) {
- this.$toast.error(`${this.$t("gql_prettify_invalid_query")}`, {
+ this.$toast.error(this.$t("gql_prettify_invalid_query"), {
icon: "error",
})
}
diff --git a/components/graphql/RequestOptions.vue b/components/graphql/RequestOptions.vue
index c5bf351de..4e53d4725 100644
--- a/components/graphql/RequestOptions.vue
+++ b/components/graphql/RequestOptions.vue
@@ -161,14 +161,15 @@
:value="header.key"
autofocus
styles="
- bg-primaryLight
- flex
- font-semibold font-mono
- flex-1
- py-2
- px-4
- focus:outline-none
- "
+ bg-primaryLight
+ flex
+ font-semibold font-mono
+ flex-1
+ py-2
+ px-4
+ truncate
+ focus:outline-none
+ "
@input="
updateGQLHeader(index, {
key: $event,
@@ -185,6 +186,7 @@
w-full
py-2
px-4
+ truncate
focus:outline-none
"
:placeholder="$t('count.value', { count: index + 1 })"
@@ -389,14 +391,14 @@ export default defineComponent({
$toast.success(t("finished_in", { duration }).toString(), {
icon: "done",
})
- } catch (error: any) {
- response.value = `${error}. ${t("check_console_details")}`
+ } catch (e: any) {
+ response.value = `${e}. ${t("error.check_console_details")}`
nuxt.value.$loading.finish()
- $toast.error(`${error} ${t("f12_details").toString()}`, {
+ $toast.error(`${e} ${t("f12_details").toString()}`, {
icon: "error",
})
- console.log("Error", error)
+ console.error(e)
}
logHoppRequestRunToAnalytics({
diff --git a/components/http/BodyParameters.vue b/components/http/BodyParameters.vue
index a1c38b7b9..131972fcd 100644
--- a/components/http/BodyParameters.vue
+++ b/components/http/BodyParameters.vue
@@ -67,6 +67,7 @@
flex-1
py-2
px-4
+ truncate
focus:outline-none
"
:placeholder="$t('count.parameter', { count: index + 1 })"
@@ -111,6 +112,7 @@
flex-1
py-2
px-4
+ truncate
focus:outline-none
"
:placeholder="$t('count.value', { count: index + 1 })"
diff --git a/components/http/Headers.vue b/components/http/Headers.vue
index 31bc01bb1..8c68793f7 100644
--- a/components/http/Headers.vue
+++ b/components/http/Headers.vue
@@ -50,6 +50,7 @@
flex-1
py-1
px-4
+ truncate
focus:outline-none
"
@input="
@@ -90,6 +91,7 @@
flex-1
py-2
px-4
+ truncate
focus:outline-none
"
:placeholder="$t('count.value', { count: index + 1 })"
diff --git a/components/http/ImportCurl.vue b/components/http/ImportCurl.vue
index e0cfb46e6..5ff988d6d 100644
--- a/components/http/ImportCurl.vue
+++ b/components/http/ImportCurl.vue
@@ -118,8 +118,8 @@ export default defineComponent({
},
})
)
- } catch (error) {
- this.showCurlImportModal = false
+ } catch (e) {
+ console.error(e)
this.$toast.error(this.$t("curl_invalid_format").toString(), {
icon: "error",
})
diff --git a/components/http/Parameters.vue b/components/http/Parameters.vue
index 6de1b46c4..c5420b769 100644
--- a/components/http/Parameters.vue
+++ b/components/http/Parameters.vue
@@ -67,6 +67,7 @@
flex-1
py-2
px-4
+ truncate
focus:outline-none
"
:placeholder="$t('count.parameter', { count: index + 1 })"
@@ -111,6 +112,7 @@
flex-1
py-2
px-4
+ truncate
focus:outline-none
"
:placeholder="$t('count.value', { count: index + 1 })"
diff --git a/components/http/RawBody.vue b/components/http/RawBody.vue
index 113673c40..f0fa2669c 100644
--- a/components/http/RawBody.vue
+++ b/components/http/RawBody.vue
@@ -118,6 +118,7 @@ export default defineComponent({
this.prettifyIcon = "done"
setTimeout(() => (this.prettifyIcon = "photo_filter"), 1000)
} catch (e) {
+ console.error(e)
this.$toast.error(`${this.$t("json_prettify_invalid_body")}`, {
icon: "error",
})
diff --git a/components/realtime/Mqtt.vue b/components/realtime/Mqtt.vue
index 84799d8aa..95b1f44e6 100644
--- a/components/realtime/Mqtt.vue
+++ b/components/realtime/Mqtt.vue
@@ -227,7 +227,7 @@ export default defineComponent({
this.connectingState = false
this.connectionState = false
this.log.push({
- payload: this.$t("error_occurred"),
+ payload: this.$t("error.something_went_wrong"),
source: "info",
color: "#ff5555",
ts: new Date().toLocaleTimeString(),
@@ -279,7 +279,7 @@ export default defineComponent({
icon: "sync_disabled",
})
} else {
- this.$toast.error(this.$t("something_went_wrong"), {
+ this.$toast.error(this.$t("error.something_went_wrong"), {
icon: "error",
})
}
@@ -298,7 +298,7 @@ export default defineComponent({
} catch (e) {
this.log.push({
payload:
- this.$t("error_occurred") +
+ this.$t("error.something_went_wrong") +
`while publishing msg: ${this.msg} to topic: ${this.pub_topic}`,
source: "info",
color: "#ff5555",
@@ -322,7 +322,7 @@ export default defineComponent({
} catch (e) {
this.log.push({
payload:
- this.$t("error_occurred") +
+ this.$t("error.something_went_wrong") +
`while subscribing to topic: ${this.sub_topic}`,
source: "info",
color: "#ff5555",
diff --git a/components/realtime/Socketio.vue b/components/realtime/Socketio.vue
index 29c1b0e9e..4263245a3 100644
--- a/components/realtime/Socketio.vue
+++ b/components/realtime/Socketio.vue
@@ -283,9 +283,9 @@ export default defineComponent({
icon: "sync_disabled",
})
})
- } catch (ex) {
- this.handleError(ex)
- this.$toast.error(this.$t("something_went_wrong"), {
+ } catch (e) {
+ this.handleError(e)
+ this.$toast.error(this.$t("error.something_went_wrong"), {
icon: "error",
})
}
@@ -302,7 +302,7 @@ export default defineComponent({
this.connectingState = false
this.connectionState = false
this.communication.log.push({
- payload: this.$t("error_occurred"),
+ payload: this.$t("error.something_went_wrong"),
source: "info",
color: "#ff5555",
ts: new Date().toLocaleTimeString(),
@@ -321,7 +321,7 @@ export default defineComponent({
.map((input) => {
try {
return JSON.parse(input)
- } catch (err) {
+ } catch (e) {
return input
}
})
diff --git a/components/realtime/Sse.vue b/components/realtime/Sse.vue
index 59670f2c7..11544f3d6 100644
--- a/components/realtime/Sse.vue
+++ b/components/realtime/Sse.vue
@@ -182,9 +182,9 @@ export default {
ts: new Date().toLocaleTimeString(),
})
})
- } catch (ex) {
- this.handleSSEError(ex)
- this.$toast.error(this.$t("something_went_wrong"), {
+ } catch (e) {
+ this.handleSSEError(e)
+ this.$toast.error(this.$t("error.something_went_wrong"), {
icon: "error",
})
}
@@ -207,7 +207,7 @@ export default {
this.stop()
this.connectionSSEState = false
this.events.log.push({
- payload: this.$t("error_occurred"),
+ payload: this.$t("error.something_went_wrong"),
source: "info",
color: "#ff5555",
ts: new Date().toLocaleTimeString(),
diff --git a/components/realtime/Websocket.vue b/components/realtime/Websocket.vue
index eb7a77747..5f9cbc0f6 100644
--- a/components/realtime/Websocket.vue
+++ b/components/realtime/Websocket.vue
@@ -91,6 +91,7 @@
flex-1
py-2
px-4
+ truncate
focus:outline-none
"
:placeholder="$t('count.protocol', { count: index + 1 })"
@@ -322,9 +323,9 @@ export default defineComponent({
ts: new Date().toLocaleTimeString(),
})
}
- } catch (ex) {
- this.handleError(ex)
- this.$toast.error(this.$t("something_went_wrong"), {
+ } catch (e) {
+ this.handleError(e)
+ this.$toast.error(this.$t("error.something_went_wrong"), {
icon: "error",
})
}
@@ -344,7 +345,7 @@ export default defineComponent({
this.disconnect()
this.connectionState = false
this.communication.log.push({
- payload: this.$t("error_occurred"),
+ payload: this.$t("error.something_went_wrong"),
source: "info",
color: "#ff5555",
ts: new Date().toLocaleTimeString(),
diff --git a/components/teams/Add.vue b/components/teams/Add.vue
index c8e408f2d..f911ea864 100644
--- a/components/teams/Add.vue
+++ b/components/teams/Add.vue
@@ -44,7 +44,9 @@ export default {
// We clear it early to give the UI a snappy feel
this.name = ""
if (!name) {
- this.$toast.info(this.$t("empty.team_name"))
+ this.$toast.info(this.$t("empty.team_name"), {
+ icon: "info",
+ })
return
}
if (name !== null && name.replace(/\s/g, "").length < 6) {
@@ -57,12 +59,10 @@ export default {
teamUtils
.createTeam(this.$apollo, name)
.then(() => {
- // Result
this.hideModal()
})
- .catch((error) => {
- // Error
- console.error(error)
+ .catch((e) => {
+ console.error(e)
// We restore the initial user input
this.name = name
})
diff --git a/components/teams/Edit.vue b/components/teams/Edit.vue
index 16dc2805d..8767fd782 100644
--- a/components/teams/Edit.vue
+++ b/components/teams/Edit.vue
@@ -2,37 +2,37 @@
-
-
+
+
+
+
-
-
+
+
+ layers
+
+ {{ $t("empty.members") }}
+
@@ -249,18 +273,16 @@ export default defineComponent({
teamUtils
.removeTeamMember(this.$apollo, userID, this.editingteamID)
.then(() => {
- // Result
this.$toast.success(this.$t("team.member_removed"), {
icon: "done",
})
this.hideModal()
})
- .catch((error) => {
- // Error
- this.$toast.error(this.$t("error_occurred"), {
- icon: "done",
+ .catch((e) => {
+ this.$toast.error(this.$t("error.something_went_wrong"), {
+ icon: "error",
})
- console.error(error)
+ console.error(e)
})
},
removeTeamMember(index) {
@@ -316,17 +338,15 @@ export default defineComponent({
this.editingteamID
)
.then(() => {
- // Result
this.$toast.success(this.$t("team.saved"), {
icon: "done",
})
})
- .catch((error) => {
- // Error
+ .catch((e) => {
this.$toast.error(error, {
icon: "done",
})
- console.error(error)
+ console.error(e)
})
})
this.members.forEach((element) => {
@@ -338,17 +358,15 @@ export default defineComponent({
this.editingteamID
)
.then(() => {
- // Result
this.$toast.success(this.$t("team.member_role_updated"), {
icon: "done",
})
})
- .catch((error) => {
- // Error
+ .catch((e) => {
this.$toast.error(error, {
icon: "done",
})
- console.error(error)
+ console.error(e)
})
})
if (this.$data.rename !== null) {
@@ -363,17 +381,15 @@ export default defineComponent({
teamUtils
.renameTeam(this.$apollo, newName, this.editingteamID)
.then(() => {
- // Result
this.$toast.success(this.$t("team.saved"), {
icon: "done",
})
})
- .catch((error) => {
- // Error
- this.$toast.error(this.$t("error_occurred"), {
- icon: "done",
+ .catch((e) => {
+ this.$toast.error(this.$t("error.something_went_wrong"), {
+ icon: "error",
})
- console.error(error)
+ console.error(e)
})
}
this.hideModal()
diff --git a/components/teams/Team.vue b/components/teams/Team.vue
index adf7089bd..ae9e07ff7 100644
--- a/components/teams/Team.vue
+++ b/components/teams/Team.vue
@@ -87,17 +87,15 @@ export default {
teamUtils
.deleteTeam(this.$apollo, this.teamID)
.then(() => {
- // Result
this.$toast.success(this.$t("team.deleted"), {
icon: "done",
})
})
- .catch((error) => {
- // Error
- this.$toast.error(this.$t("error_occurred"), {
- icon: "done",
+ .catch((e) => {
+ this.$toast.error(this.$t("error.something_went_wrong"), {
+ icon: "error",
})
- console.error(error)
+ console.error(e)
})
},
exitTeam() {
@@ -105,17 +103,15 @@ export default {
teamUtils
.exitTeam(this.$apollo, this.teamID)
.then(() => {
- // Result
this.$toast.success(this.$t("team.left"), {
icon: "done",
})
})
- .catch((error) => {
- // Error
- this.$toast.error(this.$t("error_occurred"), {
+ .catch((e) => {
+ this.$toast.error(this.$t("error.something_went_wrong"), {
icon: "error",
})
- console.error(error)
+ console.error(e)
})
},
},
diff --git a/helpers/GQLConnection.ts b/helpers/GQLConnection.ts
index 614490021..059d12107 100644
--- a/helpers/GQLConnection.ts
+++ b/helpers/GQLConnection.ts
@@ -16,8 +16,8 @@ import { GQLHeader } from "~/newstore/GQLSession"
const GQL_SCHEMA_POLL_INTERVAL = 7000
/**
- GQLConnection deals with all the operations (like polling, schema extraction) that runs
- when a connection is made to a GraphQL server.
+ GQLConnection deals with all the operations (like polling, schema extraction) that runs
+ when a connection is made to a GraphQL server.
*/
export class GQLConnection {
public isLoading$ = new BehaviorSubject
(false)
@@ -172,7 +172,8 @@ export class GQLConnection {
this.schema$.next(schema)
this.isLoading$.next(false)
- } catch (error: any) {
+ } catch (e: any) {
+ console.error(e)
this.disconnect()
}
}
diff --git a/helpers/codegen/generators/javascript-fetch.js b/helpers/codegen/generators/javascript-fetch.js
index 62f1f3b07..5d3401b42 100644
--- a/helpers/codegen/generators/javascript-fetch.js
+++ b/helpers/codegen/generators/javascript-fetch.js
@@ -58,8 +58,8 @@ export const JavascriptFetchCodegen = {
requestString.push(" response.headers\n")
requestString.push(" response.url\n\n")
requestString.push(" return response.text()\n")
- requestString.push("}).catch(function(error) {\n")
- requestString.push(" error.message\n")
+ requestString.push("}).catch(function(e) {\n")
+ requestString.push(" console.error(e)\n")
requestString.push("})")
return requestString.join("")
},
diff --git a/helpers/codegen/generators/javascript-jquery.js b/helpers/codegen/generators/javascript-jquery.js
index 5401f0bde..2a2fb8575 100644
--- a/helpers/codegen/generators/javascript-jquery.js
+++ b/helpers/codegen/generators/javascript-jquery.js
@@ -56,8 +56,8 @@ export const JavascriptJqueryCodegen = {
requestString.push(".then(response => {\n")
requestString.push(" console.log(response);\n")
requestString.push("})")
- requestString.push(".catch(error => {\n")
- requestString.push(" console.log(error);\n")
+ requestString.push(".catch(e => {\n")
+ requestString.push(" console.error(e);\n")
requestString.push("})\n")
return requestString.join("")
},
diff --git a/helpers/codegen/generators/nodejs-axios.js b/helpers/codegen/generators/nodejs-axios.js
index 0582d42d4..91c4de7da 100644
--- a/helpers/codegen/generators/nodejs-axios.js
+++ b/helpers/codegen/generators/nodejs-axios.js
@@ -51,8 +51,8 @@ export const NodejsAxiosCodegen = {
requestString.push(".then(response => {\n")
requestString.push(" console.log(response);\n")
requestString.push("})")
- requestString.push(".catch(error => {\n")
- requestString.push(" console.log(error);\n")
+ requestString.push(".catch(e => {\n")
+ requestString.push(" console.error(e);\n")
requestString.push("})\n")
return requestString.join("")
},
diff --git a/helpers/fb/auth.ts b/helpers/fb/auth.ts
index 88fc88bdd..6851d2dea 100644
--- a/helpers/fb/auth.ts
+++ b/helpers/fb/auth.ts
@@ -216,7 +216,6 @@ export async function setProviderInfo(id: string, token: string) {
.catch((e) => console.error("error updating", us, e))
} catch (e) {
console.error("error updating", e)
-
throw e
}
}
diff --git a/helpers/fb/environments.ts b/helpers/fb/environments.ts
index 1cd3b63bf..8d44b3a4b 100644
--- a/helpers/fb/environments.ts
+++ b/helpers/fb/environments.ts
@@ -38,7 +38,6 @@ async function writeEnvironments(environment: Environment[]) {
.set(ev)
} catch (e) {
console.error("error updating", ev, e)
-
throw e
}
}
diff --git a/helpers/network.ts b/helpers/network.ts
index 4d15f6a88..6fe523336 100644
--- a/helpers/network.ts
+++ b/helpers/network.ts
@@ -97,27 +97,27 @@ export function createRESTNetworkRequestStream(
response.complete()
})
- .catch((err) => {
- if (err.response) {
+ .catch((e) => {
+ if (e.response) {
const timeEnd = Date.now()
- const contentLength = err.response.headers["content-length"]
- ? parseInt(err.response.headers["content-length"])
- : (err.response.data as ArrayBuffer).byteLength
+ const contentLength = e.response.headers["content-length"]
+ ? parseInt(e.response.headers["content-length"])
+ : (e.response.data as ArrayBuffer).byteLength
const resObj: HoppRESTResponse = {
type: "fail",
- body: err.response.data,
- headers: Object.keys(err.response.headers).map((x) => ({
+ body: e.response.data,
+ headers: Object.keys(e.response.headers).map((x) => ({
key: x,
- value: err.response.headers[x],
+ value: e.response.headers[x],
})),
meta: {
responseDuration: timeEnd - timeStart,
responseSize: contentLength,
},
req,
- statusCode: err.response.status,
+ statusCode: e.response.status,
}
response.next(resObj)
@@ -126,7 +126,7 @@ export function createRESTNetworkRequestStream(
} else {
const resObj: HoppRESTResponse = {
type: "network_fail",
- error: err,
+ error: e,
req,
}
diff --git a/helpers/oauth.js b/helpers/oauth.js
index 6cc656948..019536f22 100644
--- a/helpers/oauth.js
+++ b/helpers/oauth.js
@@ -31,9 +31,8 @@ const sendPostRequest = async (url, params) => {
const response = await fetch(url, options)
const data = await response.json()
return data
- } catch (err) {
- console.error("Request failed", err)
- throw err
+ } catch (e) {
+ console.error(e)
}
}
@@ -73,9 +72,8 @@ const getTokenConfiguration = async (endpoint) => {
const response = await fetch(endpoint, options)
const config = await response.json()
return config
- } catch (err) {
- console.error("Request failed", err)
- throw err
+ } catch (e) {
+ console.error(e)
}
}
@@ -225,8 +223,8 @@ const oauthRedirect = () => {
redirect_uri: redirectUri,
code_verifier: getLocalConfig("pkce_codeVerifier"),
})
- } catch (err) {
- console.log(`${error.error}\n\n${error.error_description}`)
+ } catch (e) {
+ console.error(e)
}
}
// Clean these up since we don't need them anymore
diff --git a/helpers/strategies/AxiosStrategy.js b/helpers/strategies/AxiosStrategy.js
index de8796022..1ddf26046 100644
--- a/helpers/strategies/AxiosStrategy.js
+++ b/helpers/strategies/AxiosStrategy.js
@@ -39,6 +39,7 @@ const axiosWithProxy = async (req) => {
// eslint-disable-next-line no-throw-literal
throw "cancellation"
} else {
+ console.error(e)
throw e
}
}
@@ -58,6 +59,7 @@ const axiosWithoutProxy = async (req, _store) => {
// eslint-disable-next-line no-throw-literal
throw "cancellation"
} else {
+ console.error(e)
throw e
}
}
diff --git a/helpers/ternlint.js b/helpers/ternlint.js
index 4260409ee..793778c9f 100644
--- a/helpers/ternlint.js
+++ b/helpers/ternlint.js
@@ -631,8 +631,8 @@ export function validateFile(server, query, file) {
var visitors = makeVisitors(server, query, file, messages)
walk.simple(ast, visitors, infer.searchVisitor, state)
return { messages: messages }
- } catch (err) {
- console.error(err.stack)
+ } catch (e) {
+ console.error(e.stack)
return { messages: [] }
}
}
@@ -680,8 +680,8 @@ export function validateFiles(server, query) {
messages.push({ file: file.name, messages: messagesFile })
}
return { messages: messages }
- } catch (err) {
- console.error(err.stack)
+ } catch (e) {
+ console.error(e.stack)
return { messages: [] }
}
}
diff --git a/helpers/utils/uri.js b/helpers/utils/uri.js
index b5a8f3ef6..69b57ee04 100644
--- a/helpers/utils/uri.js
+++ b/helpers/utils/uri.js
@@ -4,7 +4,7 @@ export function parseUrlAndPath(value) {
const url = new URL(value)
result.url = url.origin
result.path = url.pathname
- } catch (error) {
+ } catch (e) {
const uriRegex = value.match(
/^((http[s]?:\/\/)?(<<[^/]+>>)?[^/]*|)(\/?.*)$/
)
diff --git a/lang/en-US.json b/lang/en-US.json
index 980372f5a..b03f2a667 100644
--- a/lang/en-US.json
+++ b/lang/en-US.json
@@ -37,7 +37,8 @@
"headers": "Headers are empty",
"tests": "Tests are empty",
"schema": "Connect to a GraphQL endpoint",
- "teams": "Teams are empty"
+ "teams": "Teams are empty",
+ "members": "Team is empty"
},
"count": {
"message": "Message {count}",
@@ -131,7 +132,7 @@
"no_access": "You do not have edit access to these collections",
"left": "You left the team",
"exit_disabled": "Only owner cannot exit the team",
- "member_role_updated": "User role(s) updated",
+ "member_role_updated": "User roles updated",
"member_removed": "User removed"
},
"modal": {
@@ -239,6 +240,10 @@
"put_method": "Select PUT method",
"delete_method": "Select DELETE method"
},
+ "error": {
+ "something_went_wrong": "Something went wrong",
+ "check_console_details": "Check console log for details."
+ },
"options": "Options",
"communication": "Communication",
"endpoint": "Endpoint",
@@ -349,8 +354,6 @@
"connected_to": "Connected to {name}",
"disconnected": "Disconnected",
"disconnected_from": "Disconnected from {name}",
- "something_went_wrong": "Something went wrong!",
- "error_occurred": "An error has occurred.",
"browser_support_sse": "This browser doesn't seems to have Server Sent Events support.",
"log": "Log",
"no_url": "No URL",
@@ -399,7 +402,6 @@
"we_use_cookies": "We use cookies",
"copied_to_clipboard": "Copied to clipboard",
"finished_in": "Finished in {duration}ms",
- "check_console_details": "Check console for details.",
"check_graphql_valid": "Check the URL to see if it is a valid GraphQL endpoint",
"graphql_introspect_failed": "Failed fetching schema details.",
"download_started": "Download started",
@@ -414,7 +416,6 @@
"one_time": "One-time",
"recurring": "Recurring",
"wiki": "Wiki",
- "error": "Error",
"home": "Home",
"reload": "Reload",
"enter_curl": "Enter cURL",
diff --git a/layouts/error.vue b/layouts/error.vue
index 2016c4e30..ce6a52bdb 100644
--- a/layouts/error.vue
+++ b/layouts/error.vue
@@ -30,7 +30,7 @@ export default {
return (this.error && this.error.statusCode) || 500
},
message() {
- return this.error.message || this.$t("something_went_wrong")
+ return this.error.message || this.$t("error.something_went_wrong")
},
},
diff --git a/netlify/api.js b/netlify/api.js
index 8bb25deca..b15b09b43 100644
--- a/netlify/api.js
+++ b/netlify/api.js
@@ -11,8 +11,8 @@ exports.handler = (event) => {
},
body: JSON.stringify({ message: `Hello ${name}` }),
}
- } catch (err) {
- return { statusCode: 500, body: err.toString() }
+ } catch (e) {
+ return { statusCode: 500, body: e.toString() }
}
default:
diff --git a/newstore/GQLSession.ts b/newstore/GQLSession.ts
index 35248731c..861952559 100644
--- a/newstore/GQLSession.ts
+++ b/newstore/GQLSession.ts
@@ -27,8 +27,7 @@ const defaultGQLSession: GQLSession = {
id
name
}
-}
- `,
+}`,
variables: `{ "id": "1" }`,
response: "",
}
diff --git a/pages/documentation.vue b/pages/documentation.vue
index a036e6d5f..2f8275715 100644
--- a/pages/documentation.vue
+++ b/pages/documentation.vue
@@ -233,11 +233,11 @@ export default defineComponent({
})
window.open(res.html_url)
})
- .catch((error) => {
- this.$toast.error(this.$t("something_went_wrong"), {
+ .catch((e) => {
+ this.$toast.error(this.$t("error.something_went_wrong"), {
icon: "error",
})
- console.log(error)
+ console.error(e)
})
},
@@ -328,8 +328,9 @@ export default defineComponent({
)
this.docsMarkdown = docsMarkdown.replace(/^\s*[\r\n]/gm, "\n\n")
} catch (e) {
- this.$toast.error(e, {
- icon: "code",
+ console.error(e)
+ this.$toast.error(this.$t("error.something_went_wrong"), {
+ icon: "error",
})
}
},
diff --git a/pages/enter.vue b/pages/enter.vue
index ff735bb08..ace60941d 100644
--- a/pages/enter.vue
+++ b/pages/enter.vue
@@ -44,9 +44,9 @@ export default Vue.extend({
removeLocalConfig("emailForSignIn")
this.$router.push({ path: "/" })
})
- .catch((error) => {
+ .catch((e) => {
this.signingInWithEmail = false
- this.error = error.message
+ this.error = e.message
})
.finally(() => {
this.signingInWithEmail = false