[minor] Throw the error object for browsers