Bug Report T1181748
Visible to All Users

Fetch API - OnServerError is not called for all erroneous response status codes

created 2 years ago (modified 2 years ago)

Steps to reproduce:

  1. Patch HTTP headers using the new fetch API: Web Reporting - Export and print capabilities now utilize Fetch instead of jQuery Ajax.
  2. Subscribe to the client-side OnServerError event of Web Document Viewer or Web Document Designer.
  3. 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>
TypeScript
doShowReport($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.

Answers approved by DevExpress Support

created 2 years ago

We have addressed the issue described in this ticket and will include a fix in our next maintenance update. Should you need to apply our fix prior to official release, you can request a hotfix here.

Important Notes:

  • Hotfixes may be unavailable for Early Access/Beta builds or updates set for release within a week.
  • .NET only: in the NuGet Package Manager, use your personal NuGet feed and check the "Include prerelease" option to view the hotfix package in the "Updates" tab.

    Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

    Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.