-
Notifications
You must be signed in to change notification settings - Fork 233
Description
Bug Report
Prerequisites
- Can you reproduce the problem?
- Are you running the latest version?
- Are you reporting to the correct repository?
- Did you perform a cursory search?
For more information, see the CONTRIBUTING guide.
Description
I am trying to create a new subscription by using this client. It does not work and throws an error with no information. Error code -1.
Creating it by sending a manual request to the Microsoft Graph API works fine.
Console Errors: [Is there any console error]
communication-ms | Error
communication-ms | at new GraphError (/app/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphError.js:31:28)
communication-ms | at Function.<anonymous> (/app/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphErrorHandler.js:98:30)
communication-ms | at step (/app/node_modules/@microsoft/microsoft-graph-client/node_modules/tslib/tslib.js:141:27)
communication-ms | at Object.next (/app/node_modules/@microsoft/microsoft-graph-client/node_modules/tslib/tslib.js:122:57)
communication-ms | at /app/node_modules/@microsoft/microsoft-graph-client/node_modules/tslib/tslib.js:115:75
communication-ms | at new Promise (<anonymous>)
communication-ms | at Object.__awaiter (/app/node_modules/@microsoft/microsoft-graph-client/node_modules/tslib/tslib.js:111:16)
communication-ms | at Function.GraphErrorHandler.getError (/app/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphErrorHandler.js:88:24)
communication-ms | at GraphRequest.<anonymous> (/app/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphRequest.js:305:84)
communication-ms | at step (/app/node_modules/@microsoft/microsoft-graph-client/node_modules/tslib/tslib.js:141:27)
communication-ms | at Object.throw (/app/node_modules/@microsoft/microsoft-graph-client/node_modules/tslib/tslib.js:122:57)
communication-ms | at rejected (/app/node_modules/@microsoft/microsoft-graph-client/node_modules/tslib/tslib.js:113:69)
communication-ms | at processTicksAndRejections (internal/process/task_queues.js:93:5) {
communication-ms | statusCode: -1,
communication-ms | code: null,
communication-ms | requestId: null,
communication-ms | date: 2020-10-12T13:27:06.484Z,
communication-ms | body: null
communication-ms | }
Screenshots: [If applicable, add screenshots to help explain your problem]
Steps to Reproduce
Make sure to have auth setup and then trigger this api method:
const payload = {
changeType: "created",
notificationUrl: "https://70f7e3333573.ngrok.io/office365/incoming",
resource: "me/events",
expirationDateTime: "2020-10-13T00:00:00Z"
};
let subscription = await this.office365.api("/subscriptions").post({
subscription: payload
});
Expected behavior: [What you expected to happen]
Create a notification and don't throw error.
Actual behavior: [What actually happened]
Does not create subscription and throws error with no information.
Additional Context
Add any other context about the problem here..
Usage Information
SDK Version - [SDK version you are using]
- Node (Check, if using Node version of SDK)
v2.1.0
Node Version - [The version of Node you are using]
v12.13.1
- [] Browser (Check, if using Browser version of SDK)
Browser Name - [The name of Browser that you are using for SDK]
Version - [The version of the browser you are using]