Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/fx-core/src/component/m365/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ export const outlookCopilotAppId = "d870f6cd-4aa5-4d42-9626-ab690c041429";
export const outlookBaseUrl = "https://outlook.office.com";
export const officeBaseUrl = "https://www.office.com";
export const advancedDASettingUrl = "https://aka.ms/atk-actions/teamsapp-extendToM365";
export const M365HelpLink = "https://aka.ms/teamsfx-actions/teamsapp-extendToM365";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we avoid using teamsfx in URL?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the existing aka link. I don't think we can remove it for now since it'll break former version.

3 changes: 2 additions & 1 deletion packages/fx-core/src/component/m365/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import { UserError } from "@microsoft/teamsfx-api";

import { getDefaultString, getLocalizedString } from "../../common/localizeUtils";
import { M365HelpLink } from "./constants";

export class NotExtendedToM365Error extends UserError {
constructor(source: string) {
Expand All @@ -12,7 +13,7 @@ export class NotExtendedToM365Error extends UserError {
name: "NotExtendedToM365Error",
message: getDefaultString("error.m365.NotExtendedToM365Error"),
displayMessage: getLocalizedString("error.m365.NotExtendedToM365Error"),
helpLink: "https://aka.ms/teamsfx-actions/teamsapp-extendToM365",
helpLink: M365HelpLink,
});
}
}
8 changes: 6 additions & 2 deletions packages/fx-core/src/component/m365/packageService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import { NotExtendedToM365Error } from "./errors";
import { M365AppDefinition, M365AppEntity } from "./interface";
import { MosServiceEndpoint } from "./serviceConstant";
import { getDefaultString, getLocalizedString } from "../../common/localizeUtils";
import { advancedDASettingUrl } from "./constants";
import { advancedDASettingUrl, M365HelpLink } from "./constants";

const M365ErrorSource = "M365";
const M365ErrorComponent = "PackageService";
Expand Down Expand Up @@ -257,7 +257,11 @@ export class PackageService {
if (error.response) {
error = this.traceError(error);
}
throw assembleError(error, M365ErrorSource);
const err = assembleError(error, M365ErrorSource);
if (err instanceof UserError) {
err.helpLink = M365HelpLink;
}
throw err;
}
}

Expand Down
Loading