Steps to reproduce:
- Patch HTTP headers using the new fetch API: Web Reporting - Export and print capabilities now utilize Fetch instead of jQuery Ajax.
- Subscribe to the client-side
OnServerError
event of Web Document Viewer or Web Document Designer. - Return the 4xx error from the server using the
application/problem+json
MIME type.
HTML<dx-report-viewer [hidden]="!showReport" [reportUrl]="reportUrl" height="500px">
<dxrv-callbacks (OnServerError)="onServerError($event)"></dxrv-callbacks>
</dx-report-viewer>
TypeScriptdoShowReport($event: any) {
fetchSetup.fetchSettings = {
headers: {
'Authorization': 'Bearer ' + this.authService.user?.jwtToken
},
};
this.viewer.bindingSender.OpenReport("Report1);
}
onServerError(e: any) {
console.log(e); //not called
}
Expected results:
The event is invoked and it's possible to refresh an access token there.
Current results:
The event is not called. See the attached demo.