go-macaroon / js-macaroon

Javascript implementation of macaroons
BSD 3-Clause "New" or "Revised" License
41 stars 22 forks source link

Bakery not returning an error object on 500s #36

Closed squidsoup closed 5 years ago

squidsoup commented 5 years ago

It appears, _getThirdPartyDischarge fails to receive an error object on a 500 and proceeds to parse a failed response, passing undefined instead of a macaroon object into macaroonlib.importMacaroons.

macaroon.js:962 Uncaught TypeError: Cannot read property 'signature' of undefined
    at importJSON (macaroon.js:962)
    at Object.importMacaroons (macaroon.js:953)
    at callback (index.js:323)
    at exitSuccessfully (index.js:230)
    at response (index.js:236)
    at XMLHttpRequest.handler (index.js:585)