@@ -54,7 +54,7 @@ export async function uploadToOneDrive(params: {
5454 throw await createMSTeamsHttpError ( res , "OneDrive upload failed" ) ;
5555 }
5656
57- const data = ( await res . json ( ) ) as {
57+ const data = ( await readProviderJsonResponse ( res , "graph-upload" ) ) as {
5858 id ?: string ;
5959 webUrl ?: string ;
6060 name ?: string ;
@@ -106,7 +106,7 @@ async function createSharingLink(params: {
106106 throw await createMSTeamsHttpError ( res , "Create sharing link failed" ) ;
107107 }
108108
109- const data = ( await res . json ( ) ) as {
109+ const data = ( await readProviderJsonResponse ( res , "graph-upload" ) ) as {
110110 link ?: { webUrl ?: string } ;
111111 } ;
112112
@@ -200,7 +200,7 @@ export async function uploadToSharePoint(params: {
200200 throw await createMSTeamsHttpError ( res , "SharePoint upload failed" ) ;
201201 }
202202
203- const data = ( await res . json ( ) ) as {
203+ const data = ( await readProviderJsonResponse ( res , "graph-upload" ) ) as {
204204 id ?: string ;
205205 webUrl ?: string ;
206206 name ?: string ;
@@ -260,7 +260,7 @@ export async function getDriveItemProperties(params: {
260260 throw await createMSTeamsHttpError ( res , "Get driveItem properties failed" ) ;
261261 }
262262
263- const data = ( await res . json ( ) ) as {
263+ const data = ( await readProviderJsonResponse ( res , "graph-upload" ) ) as {
264264 eTag ?: string ;
265265 webDavUrl ?: string ;
266266 name ?: string ;
@@ -331,7 +331,7 @@ export async function resolveGraphChatId(params: {
331331 return null ;
332332 }
333333
334- const data = ( await res . json ( ) ) as {
334+ const data = ( await readProviderJsonResponse ( res , "graph-upload" ) ) as {
335335 value ?: Array < { id ?: string } > ;
336336 } ;
337337
@@ -371,7 +371,7 @@ async function getChatMembers(params: {
371371 throw await createMSTeamsHttpError ( res , "Get chat members failed" ) ;
372372 }
373373
374- const data = ( await res . json ( ) ) as {
374+ const data = ( await readProviderJsonResponse ( res , "graph-upload" ) ) as {
375375 value ?: Array < {
376376 userId ?: string ;
377377 displayName ?: string ;
@@ -435,7 +435,7 @@ async function createSharePointSharingLink(params: {
435435 throw await createMSTeamsHttpError ( res , "Create SharePoint sharing link failed" ) ;
436436 }
437437
438- const data = ( await res . json ( ) ) as {
438+ const data = ( await readProviderJsonResponse ( res , "graph-upload" ) ) as {
439439 link ?: { webUrl ?: string } ;
440440 } ;
441441
0 commit comments