Delete BaseHTTPService and implement new BaseXmlService (affects [eclipse-marketplace f-droid]; also testing on [uptimerobot circleci]) (#2037)
This commit is contained in:
@@ -50,18 +50,6 @@ checkErrorResponse.asPromise = function(errorMessages = {}) {
|
||||
}
|
||||
}
|
||||
|
||||
async function asJson({ buffer, res }) {
|
||||
try {
|
||||
return JSON.parse(buffer)
|
||||
} catch (err) {
|
||||
throw new InvalidResponse({
|
||||
prettyMessage: 'unparseable json response',
|
||||
underlyingError: err,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
checkErrorResponse,
|
||||
asJson,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user