Correctly check and propagate errors in v2 session

Signed-off-by: Stephen J Day <stephen.day@docker.com>
Merge pull request #7 from stevvooe/v2-registry-fixerrors

Correctly check and propagate errors in v2 session