diff --git a/src/cmd/flux-kvs.c b/src/cmd/flux-kvs.c index aed951bd21a4..1ae99f3868cd 100644 --- a/src/cmd/flux-kvs.c +++ b/src/cmd/flux-kvs.c @@ -2019,8 +2019,13 @@ void eventlog_get_continuation (flux_future_t *f, void *arg) if (flux_kvs_lookup_get (f, &s) < 0) log_err_exit ("flux_kvs_lookup_get"); - if (!(a = eventlog_decode (s))) + if (!(a = eventlog_decode (s))) { + if (errno == EINVAL) { + log_msg ("cannot decode improperly formatted eventlog"); + exit (1); + } log_err_exit ("eventlog_decode"); + } json_array_foreach (a, index, value) { if (optparse_hasopt (ctx->p, "watch")) { @@ -2135,8 +2140,13 @@ void eventlog_wait_event_continuation (flux_future_t *f, void *arg) log_err_exit ("flux_kvs_lookup_get"); } - if (!(a = eventlog_decode (s))) + if (!(a = eventlog_decode (s))) { + if (errno == EINVAL) { + log_msg ("cannot decode improperly formatted eventlog"); + exit (1); + } log_err_exit ("eventlog_decode"); + } json_array_foreach (a, index, value) { const char *name;