purescript-book icon indicating copy to clipboard operation
purescript-book copied to clipboard

Chapter 12 - treating an `Error` as a `String`?

Open craigdallimore opened this issue 7 years ago • 0 comments

Hello!

I was finding that I was getting a runtime TypeError when taking the Left path on the exercises in 12.7. I suspect that we're expecting the argument to the request onError callback to be a String when it is potentially something like a JavaScript Error object. If I explicitly cast to string in Client.js I no longer get that runtime TypeError.

Of course I might be misunderstanding something!

This indicates both callbacks come from String, no?

What if this is not a string?

craigdallimore avatar Sep 26 '17 04:09 craigdallimore