提交 ab4ff3a1 编写于 作者: T Tomas Vik

chore: add a log statement so users can easier copy-paste

上级 4de89abe
...@@ -37,6 +37,7 @@ import { ...@@ -37,6 +37,7 @@ import {
} from './graphql/get_project'; } from './graphql/get_project';
import { createDiffNoteMutation, GqlDiffPositionInput } from './graphql/create_diff_comment'; import { createDiffNoteMutation, GqlDiffPositionInput } from './graphql/create_diff_comment';
import { removeLeadingSlash } from '../utils/remove_leading_slash'; import { removeLeadingSlash } from '../utils/remove_leading_slash';
import { log } from '../log';
interface CreateNoteResult { interface CreateNoteResult {
createNote: { createNote: {
...@@ -419,10 +420,11 @@ export class GitLabNewService { ...@@ -419,10 +420,11 @@ export class GitLabNewService {
); );
return result.createDiffNote.note.discussion; return result.createDiffNote.note.discussion;
} catch (e) { } catch (e) {
log(body);
throw new UserFriendlyError( throw new UserFriendlyError(
`Extension failed to create the comment. `Extension failed to create the comment.
Open extension logs to see your comment text and find more details about the error.`, Open extension logs to see your comment text and find more details about the error.`,
new Error(`MR(${mrId}), text(${body}),\n${JSON.stringify(position)}, ${e}`), new Error(`MR(${mrId}), ${JSON.stringify(position)}, ${e}`),
); );
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册