fix protobuf_json while handling enums
use error field from trezord