throw Error instance (not string) from webapi calls