[cli] add error check to `udp send` command (#4148)

diff --git a/src/cli/cli_udp.cpp b/src/cli/cli_udp.cpp
index c13fb1c..60f9ddb 100644
--- a/src/cli/cli_udp.cpp
+++ b/src/cli/cli_udp.cpp
@@ -148,7 +148,8 @@
     {
         if (strcmp(argv[curArg++], "-s") == 0)
         {
-            Interpreter::ParseUnsignedLong(argv[curArg++], autoGenMessageLength);
+            error = Interpreter::ParseUnsignedLong(argv[curArg++], autoGenMessageLength);
+            SuccessOrExit(error);
         }
         else
         {