Angular: HTTP failure during parsing[Support Request]: #2464

Closed
opened 2026-02-05 04:14:38 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @ghost on GitHub (Oct 29, 2021).

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

Hello,
i try to get the API working on Angular 7.
In general, all works fine, but if i get a request for the export in html, the Angular httpClient get a error "Http failure during parsing for http://localhost:6875/api/pages/1/export/html". But with the error comes the html-output and can be used correctly.
Can someone help me, what correct Header-settings i have to use to get rid of that error?

Exact BookStack Version

21.10.2-ls168

Log Content

No response

PHP Version

No response

Hosting Environment

linuxserver/docker-bookstack 21.10.2-ls168

Originally created by @ghost on GitHub (Oct 29, 2021). ### Attempted Debugging - [X] I have read the debugging page ### Searched GitHub Issues - [X] I have searched GitHub for the issue. ### Describe the Scenario Hello, i try to get the API working on Angular 7. In general, all works fine, but if i get a request for the export in html, the Angular httpClient get a error "Http failure during parsing for http://localhost:6875/api/pages/1/export/html". But with the error comes the html-output and can be used correctly. Can someone help me, what correct Header-settings i have to use to get rid of that error? ### Exact BookStack Version 21.10.2-ls168 ### Log Content _No response_ ### PHP Version _No response_ ### Hosting Environment linuxserver/docker-bookstack 21.10.2-ls168
OVERLORD added the 🐕 Support label 2026-02-05 04:14:38 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Oct 29, 2021):

Hi @numpsi2002,

This seems quite angular specific, unfortunately I have not been into angular since the AngularJS (1.x) days so I'm not familiar with modern angular practices.

It looks like the angular HTTP client expects JSON by default, that specific endpoint will provide HTML content.
Have you tried passing a {responseType: 'text'} setting to you Angular client request as per this answer?:

https://stackoverflow.com/questions/46408537/angular-httpclient-http-failure-during-parsing#answer-46408622

@ssddanbrown commented on GitHub (Oct 29, 2021): Hi @numpsi2002, This seems quite angular specific, unfortunately I have not been into angular since the AngularJS (1.x) days so I'm not familiar with modern angular practices. It looks like the angular HTTP client expects JSON by default, that specific endpoint will provide HTML content. Have you tried passing a `{responseType: 'text'}` setting to you Angular client request as per this answer?: https://stackoverflow.com/questions/46408537/angular-httpclient-http-failure-during-parsing#answer-46408622
Author
Owner

@ssddanbrown commented on GitHub (Nov 4, 2021):

Since there's been no follow-up I'm going to close this. If the issue remains and is something you still require to be fixed please open a new issue, referencing this one.

@ssddanbrown commented on GitHub (Nov 4, 2021): Since there's been no follow-up I'm going to close this. If the issue remains and is something you still require to be fixed please open a new issue, referencing this one.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#2464