Closed greg-a-atkinson closed 1 year ago
Hello,
This looks like a question on using Scala.js, rather than a bug report. The GitHub Issues in this repo are for bug reports and feature requests only. Please ask questions on StackOverflow or on Discord (channel #scala-js
), where more than just the core developers can see and answer.
Thank you for your understanding.
That said, for anyone reading this and thinking about the try/catch
solution, it's not going to work in fullLinkJS because it relies on undefined behavior.
Hi!
I was wondering what is the best approach to dealing with
Response.`type`
when the underlyingjs.native
value isundefined
?When this is case the following error is raised:
ResponseType
does not currently support this scenario:Unfortunately I don't control nor can I alter the server returning the response with an empty content type, to what is originally a POST request.
The best I have for now is to wrap the call to
Response.`type`
in either a very forgivingtry-catch
statement:Or a deeper specific
try-catch
statement:Any ideas?
Thank you!