The error message is actually a object and not a string so we format it
a bit better with this patch.
Signed-off-by: Kristján Oddsson <koddsson@gmail.com>
Make sure that errors that happen when pulling image layers bubble up to
the UI. We do this by catching errors coming from the docker client,
calling the callback with that error and setting the global variable
`_error` as the error we just caught. This is to make sure that when the
stream ends we call the callback with the error as well as to not to
over-ride it.
Finally we remove the hard-coded message in the UI and display the error
that gets passed in to it through the props attribute. This is the only
part I'm not super sure on if we really want since it must have been set
there for a reason. If I can get a re-producible test case I can make
sure that it's still passing with this patch.
Fixes#355.
Signed-off-by: Kristján Oddsson <koddsson@gmail.com>