Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added<<<<<<< fix/41
### Added
- Added 'Unauthorized' to the fetch status (#90)
- Query title above the result table (#41)

### Changed
- On empty query result, show clear message (#86)
- Force accept headers to favor NQuads to remove JSON-LD Context CORS issue problems (#100)

### Fixed
- Fixed pagination bug in templated queries (#80)
Expand Down Expand Up @@ -81,4 +82,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[1.1.0]: https://github.com/SolidLabResearch/generic-data-viewer-react-admin/releases/tag/v1.1.0
[1.1.1]: https://github.com/SolidLabResearch/generic-data-viewer-react-admin/releases/tag/v1.1.1
[1.1.2]: https://github.com/SolidLabResearch/generic-data-viewer-react-admin/releases/tag/v1.1.2
[1.1.2]: https://github.com/SolidLabResearch/generic-data-viewer-react-admin/releases/tag/v1.1.2
[Unreleased]: https://github.com/SolidLabResearch/generic-data-viewer-react-admin/compare/v1.1.2...HEAD
10 changes: 7 additions & 3 deletions src/dataProvider/SparqlDataProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,13 +237,17 @@ function generateContext(context) {
*/
function statusFetch(customFetch, context) {
const wrappedFetchFunction = async (arg) => {
try{
const response = await customFetch(arg);
try {
const response = await customFetch(arg, {
headers: {
Accept: "application/n-quads,application/trig;q=0.95,application/ld+json;q=0.9,application/n-triples;q=0.8,*/*;q=0.1"
}
});
context.fetchSuccess[arg] = response.ok;
context.fetchStatusNumber[arg] = response.status;
return response;
}
catch(error){
catch (error) {
context.fetchSuccess[arg] = false;
throw error;
}
Expand Down