attach '.data' to Error objects

Attach additional information about the error to the '.data' property of
the error being thrown.