Closed woutermont closed 4 years ago
Thanks @woutermont . I'd prefer the fallback value to be undefined
instead of false
, as it would nicely align with the typescript interface for that field we already have.
About the auto-formatting: no problem. I think a few files haven't been autoformatted yet. I'll do that after merging
Thanks!
Problem: While working on #162 I stumbled upon an issue in the Yasr code, after upgrading dependencies. Turned out to be caused by
@types/superagent
, in a minor change (4.1.4 => 4.1.7
).To reproduce: Selectively/interactively upgrade
@types/superagent
, then try to build Yasr.Cause: The superagent update changed the type of it's
Response.error
fromResponseError
to the union typefalse | HTTPError
. This breaks a call toerror.text
inyasr/src/parsers/index.ts
.Fix: Added a boolean check to see whether or not the error is indeed a
HTTPError
.Discussion:
false
. If desired, this could be something else.