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

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

上级 4de89abe
......@@ -37,6 +37,7 @@ import {
} from './graphql/get_project';
import { createDiffNoteMutation, GqlDiffPositionInput } from './graphql/create_diff_comment';
import { removeLeadingSlash } from '../utils/remove_leading_slash';
import { log } from '../log';
interface CreateNoteResult {
createNote: {
......@@ -419,10 +420,11 @@ export class GitLabNewService {
);
return result.createDiffNote.note.discussion;
} catch (e) {
log(body);
throw new UserFriendlyError(
`Extension failed to create the comment.
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.
先完成此消息的编辑!
想要评论请 注册