Skip to content

Commit

Permalink
Merge pull request #99 from kenhowardpdx/bugfix/90-insights-messsage
Browse files Browse the repository at this point in the history
fix(insights): use proper message key for exceptions
  • Loading branch information
Ken Howard authored Feb 3, 2019
2 parents 25b9e2d + 2af8946 commit 1c3c53e
Show file tree
Hide file tree
Showing 15 changed files with 14 additions and 14 deletions.
Binary file removed .DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion src/commands/gists/add.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const add: CommandInitializer = (
} catch (err) {
const error: Error = err as Error;
logger.error(`${command} > ${error && error.message}`);
insights.exception(command, { messsage: error.message });
insights.exception(command, { message: error.message });
utils.notify.error('Could Not Add File', `Reason: ${error.message}`);
}
};
Expand Down
2 changes: 1 addition & 1 deletion src/commands/gists/create-confirmation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const createConfirmation: CommandInitializer = (
} catch (err) {
const error: Error = err as Error;
logger.error(`${command} > ${error && error.message}`);
insights.exception(command, { messsage: error.message });
insights.exception(command, { message: error.message });
utils.notify.error(error.message);
}
};
Expand Down
2 changes: 1 addition & 1 deletion src/commands/gists/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const create: CommandInitializer = (
const context = gistName ? ` ${gistName}` : '';
const error: Error = err as Error;
logger.error(`${command} > ${error && error.message}`);
insights.exception(command, { messsage: error.message });
insights.exception(command, { message: error.message });
utils.notify.error(
`Could Not Create${context}`,
`Reason: ${error.message}`
Expand Down
2 changes: 1 addition & 1 deletion src/commands/gists/delete-file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const deleteFile: CommandInitializer = (
} catch (err) {
const error: Error = err as Error;
logger.error(`${command} > ${error && error.message}`);
insights.exception(command, { messsage: error.message });
insights.exception(command, { message: error.message });
utils.notify.error('Could Not Delete File', `Reason: ${error.message}`);
}
};
Expand Down
2 changes: 1 addition & 1 deletion src/commands/gists/delete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const deleteCommand: CommandInitializer = (
} catch (err) {
const error: Error = err as Error;
logger.error(`${command} > ${error && error.message}`);
insights.exception(command, { messsage: error.message });
insights.exception(command, { message: error.message });
utils.notify.error('Could Not Delete Gist', `Reason: ${error.message}`);
}
};
Expand Down
2 changes: 1 addition & 1 deletion src/commands/gists/insert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const insert: CommandInitializer = (
} catch (err) {
const error: Error = err as Error;
logger.error(`${command} > ${error && error.message}`);
insights.exception(command, { messsage: error.message });
insights.exception(command, { message: error.message });
utils.notify.error('Could Not Insert', `Reason: ${error.message}`);
}
};
Expand Down
2 changes: 1 addition & 1 deletion src/commands/gists/open-favorite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const openFavorite: CommandInitializer = (
} catch (err) {
const error: Error = err as Error;
logger.error(`${command} > ${error && error.message}`);
insights.exception(command, { messsage: error.message });
insights.exception(command, { message: error.message });
if (error && error.message === 'Not Found') {
utils.notify.error(
`Could Not Open Gist ${gistName}`,
Expand Down
2 changes: 1 addition & 1 deletion src/commands/gists/open-in-browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const openInBrowser: CommandInitializer = (
const error: Error = err as Error;
logger.error(`${command} > ${error && error.message}`);
if (knownErrors.indexOf(error && error.message) === -1) {
insights.exception(command, { messsage: error.message });
insights.exception(command, { message: error.message });
}
if (error && error.message === 'Not Found') {
utils.notify.error(
Expand Down
2 changes: 1 addition & 1 deletion src/commands/gists/open.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const open: CommandInitializer = (
} catch (err) {
const error: Error = err as Error;
logger.error(`${command} > ${error && error.message}`);
insights.exception(command, { messsage: error.message });
insights.exception(command, { message: error.message });
if (error && error.message === 'Not Found') {
utils.notify.error(
`Could Not Open Gist ${gistName}`,
Expand Down
2 changes: 1 addition & 1 deletion src/commands/gists/update-access-key.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const updateAccessKey: CommandInitializer = (
} catch (err) {
const error: Error = err as Error;
logger.error(`${command} > ${error && error.message}`);
insights.exception(command, { messsage: error.message });
insights.exception(command, { message: error.message });
utils.notify.error('Could Not Update Access Key', error.message);
}
};
Expand Down
2 changes: 1 addition & 1 deletion src/commands/profiles/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const create: CommandInitializer = (
} catch (err) {
const error: Error = err as Error;
logger.error(`${command} > ${error && error.message}`);
insights.exception(command, { messsage: error.message });
insights.exception(command, { message: error.message });
utils.notify.error(
'Could Not Create Profile',
`Reason: ${error.message}`
Expand Down
2 changes: 1 addition & 1 deletion src/commands/profiles/select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const select: CommandInitializer = (
} catch (err) {
const error: Error = err as Error;
logger.error(`${command} > ${error && error.message}`);
insights.exception(command, { messsage: error.message });
insights.exception(command, { message: error.message });
utils.notify.error(
'Could Not Select Profile',
`Reason: ${error.message}`
Expand Down
2 changes: 1 addition & 1 deletion src/commands/status-bar/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const update: CommandInitializer = (
} catch (err) {
const error: Error = err as Error;
logger.error(`${command} > ${error && error.message}`);
insights.exception(command, { messsage: error.message });
insights.exception(command, { message: error.message });
}
};

Expand Down
2 changes: 1 addition & 1 deletion src/listeners/on-did-save-text-document.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const onDidSaveTextDocument: ListenerInitializer = (
} catch (err) {
const error: Error = err as Error;
logger.error(`${listenerStr} > ${error && error.message}`);
insights.exception(listenerStr, { messsage: error.message });
insights.exception(listenerStr, { message: error.message });
if (error && error.message === 'Not Found') {
utils.notify.error(
`Could Not Save ${file}`,
Expand Down

0 comments on commit 1c3c53e

Please sign in to comment.