So, according to official documentation sample, responses from OneNote might have the following structure:
{
value:{the content we requested},
error:{error if exists with warnings inside if exist},
@api.diagnostics:{warnings if exist}
}
But, if the response body contains not JSON array but JSON Object, the response would be the following
{
Here would be entity, representing the content we requested
}
So, my question is next: is there a way to unify responses from OneNote API, because current response structure violates its contract.
As i have an ability to change my request module using interceptors so the output will look like I need, this seems to be a dirty workaround, so I'd like to see an official information on this issue.