Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: add debug log #11267

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,8 @@ export namespace AppStudioClient {
export async function publishTeamsAppUpdate(
teamsAppId: string,
file: Buffer,
appStudioToken: string
appStudioToken: string,
logProvider?: LogProvider
): Promise<string> {
setErrorContext({ source: "Teams" });
try {
Expand Down Expand Up @@ -395,6 +396,7 @@ export namespace AppStudioClient {

// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
const requestPath = `${response.request?.method} ${response.request?.path}`;
logProvider?.debug(`The response of ${requestPath} is ${JSON.stringify(response)}`);
if (response && response.data) {
if (response.data.error || response.data.errorMessage) {
const error = new Error(response.data.error?.message || response.data.errorMessage);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ export class PublishAppPackageDriver implements StepDriver {
const appId = await AppStudioClient.publishTeamsAppUpdate(
manifest.id,
archivedFile,
appStudioTokenRes.value
appStudioTokenRes.value,
context.logProvider
);
result = new Map([[outputEnvVarNames.get("publishedAppId") as string, appId]]);
merge(context.telemetryProperties, {
Expand Down