Closed kkazala closed 5 months ago
Based on the documentation this API call returns HTTP/1.1 202 Accepted
and would not have a body.
Can you try using HeaderParse
as a workaround?
import { HeaderParse } from "@pnp/queryable";
const eventsQuery = GraphQueryable(calendar.events.getById(x.EventId), `/cancel`);
eventsQuery.using(HeaderParse());
//...
@patrick-rodgers It seems it was a fluke, because the same code, for the same tests, works OK today.
I'm noting down your recommendation to use the HeaderParse
for troubleshooting, I'm sure it will come handy sooner or later.
thx!
This issue is locked for inactivity or age. If you have a related issue please open a new issue and reference this one. Closed issues are not tracked.
Major Version
3.x
Minor Version Number
17
Target environment
NodeJS
Additional environment details
Local dev using service principal, with read/write to the shared mailbox
Authentication using
issue not related to the authentication, I can create/update/cancel events. Just the response is kinda wrong
Expected or Desired Behavior
Event should be cancelled (this works) and the repose should indicate success
Observed Behavior
Following example from #2942 I'm cancelling events in batch (see code below) The event is cancelled, the user receives an email with the message:![image](https://github.com/pnp/pnpjs/assets/22429087/d2e268c2-f5ef-40dd-b5f4-e6e8a3f7d135)
However, an error is thrown:
Cannot convert undefined or null to object
thee.stack
contains:Steps to Reproduce
the code in #2942 throws the same error. I think it's not related to how I sent the request, but rather to how the response is parsed