@softeria/ms-365-mcp-server 0.12.1 → 0.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/graph-client.js +9 -1
- package/package.json +1 -1
package/dist/graph-client.js
CHANGED
|
@@ -110,7 +110,15 @@ class GraphClient {
|
|
|
110
110
|
if (!response.ok) {
|
|
111
111
|
throw new Error(`Microsoft Graph API error: ${response.status} ${response.statusText}`);
|
|
112
112
|
}
|
|
113
|
-
|
|
113
|
+
const text = await response.text();
|
|
114
|
+
if (text === "") {
|
|
115
|
+
return { message: "OK!" };
|
|
116
|
+
}
|
|
117
|
+
try {
|
|
118
|
+
return JSON.parse(text);
|
|
119
|
+
} catch (jsonError) {
|
|
120
|
+
return { message: "OK!", rawResponse: text };
|
|
121
|
+
}
|
|
114
122
|
} catch (error) {
|
|
115
123
|
logger.error("Microsoft Graph API request failed:", error);
|
|
116
124
|
throw error;
|