registry: log errors on failure

If an image fails to be updated/created/deleted/etc for whatever reason,
the registry server returns 500 – but there's no trace of the actual
error. Let's catch the exception log it, and then re-raise it so it
still return a 500 status code. But at least we can debug.

Change-Id: Id437f23011a10365e85914dc1934f610bfa3dd28
Merge "registry: log errors on failure"