conwetlab / ngsijs

JavaScript library for the FIWARE Context Broker services (web browsers & Node.js)
11 stars 16 forks source link

status code is not provided when InvalidResponseError is obtained #54

Closed AlvaroVega closed 1 year ago

AlvaroVega commented 2 years ago

status code is not provided when InvalidResponseError is obtained

https://github.com/conwetlab/ngsijs/blob/59ce53e2cfd7b486aa9580cbbc74dc339b134af2/dist/NGSI.js#L1687-L1691

InvalidResponseError could happens for example when PEP responses 401

Not sure if is really a bug or maybe just something that could be improved. Others errors like InvalidRequestError are providing status code:

https://github.com/conwetlab/ngsijs/blob/59ce53e2cfd7b486aa9580cbbc74dc339b134af2/dist/NGSI.js#L1624-L1629

AlvaroVega commented 1 year ago

done in https://github.com/Ficodes/ngsijs/pull/23