fetch-sparql-endpoint
Advanced tools
Comparing version 2.2.0 to 2.3.0
@@ -9,2 +9,3 @@ "use strict"; | ||
const sparqlxml_parse_1 = require("sparqlxml-parse"); | ||
const stringifyStream = require("stream-to-string"); | ||
// tslint:disable:no-var-requires | ||
@@ -187,3 +188,7 @@ const n3 = require('n3'); | ||
const simpleUrl = /^[^?]*/u.exec(url)[0]; | ||
throw new Error('Invalid SPARQL endpoint (' + simpleUrl + ') response: ' + httpResponse.statusText); | ||
let bodyString = 'empty response'; | ||
if (httpResponse.body) { | ||
bodyString = await stringifyStream(responseStream); | ||
} | ||
throw new Error(`Invalid SPARQL endpoint response from ${simpleUrl} (HTTP status ${httpResponse.status}):\n${bodyString}`); | ||
} | ||
@@ -190,0 +195,0 @@ return [contentType, responseStream]; |
{ | ||
"name": "fetch-sparql-endpoint", | ||
"version": "2.2.0", | ||
"version": "2.3.0", | ||
"description": "A simple, lightweight module to send queries to SPARQL endpoints and retrieve their results in a streaming fashion.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28370
442