Errors was recently converted to use objects as representation instead of strings. Issue golang/go#17073 exposed a few places that wasn't properly updated. Fix them and add the test case from the the issue. Fixes golang/go#17073 Change-Id: I0191993a8427d930540716407fc09032f282fc66 Reviewed-on: https://go-review.googlesource.com/29176 Reviewed-by: David Crawshaw <crawshaw@golang.org>