Fix bug: Can't get error code.