* Returns an Error that wraps the inner error obtained while fetching metadata information. * @private
(err, requestOptions, isParsingError)
| 209 | * @private |
| 210 | */ |
| 211 | function getServiceRequestError(err, requestOptions, isParsingError) { |
| 212 | const message = isParsingError |
| 213 | ? 'There was an error while parsing the metadata service information' |
| 214 | : 'There was an error fetching the metadata information'; |
| 215 | |
| 216 | const url = `${requestOptions.hostname}:${requestOptions.port}${(requestOptions.path) ? requestOptions.path : '/'}`; |
| 217 | return new errors.NoHostAvailableError({ [url] : err }, message); |
| 218 | } |
| 219 | |
| 220 | /** |
| 221 | * @param {{subject: {CN: string}, subjectaltname: string?}} cert A certificate object as defined by |
no outgoing calls
no test coverage detected