CBQE-989: ensure error messages are dict's

seeing lots of the following errors in the console
due to attempts to subscript int's longs
which are opaque values being returned and
not real error mesages...

Change-Id: I7b0c3c549a1a1c511a460a6f057f65aead6e45b2
Error: 'int' object is not subscriptable
Error: 'long' object is not subscriptable
Error: 'int' object is not subscriptable
Reviewed-on: http://review.couchbase.org/24141
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Chisheng Hong <chisheng@couchbase.com>