Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-17109

Error handling for invalid url passed to any command

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • None

    Description

      Description

      Different commands given the wrong URL display different messages. For example

       

      disconnected]> connect lkhjasdflkjhhasdf
      2022-06-06 10:41:04:665 +0100 [ERROR][main][ExceptionHandler] Unhandled exception
      java.lang.IllegalArgumentException: Expected URL scheme 'http' or 'https' but no colon was found
              at okhttp3.HttpUrl$Builder.parse$okhttp(HttpUrl.kt:1260)
              at okhttp3.HttpUrl$Companion.get(HttpUrl.kt:1633)
              at okhttp3.Request$Builder.url(Request.kt:184)
      ...
      Internal error! 

       

      [disconnected]> connect http://kjhasdflkjhhasdf:10300/
      Api error: null
      

       

      [disconnected]> sql -u=hdbkljghhgasdflkjhasdf
      Connection failed. 

      To-Do

      • Test all possible variations of incorrect URLs with integration/interface tests
      • Define a single error handler for the wrong URL, port, etc.

      As a result, all variations of wrong data passed should be handled on a consistent way. The user has to see the same messages for the same mistakes regardless of the command is used.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              aleksandr.pakhomov Aleksandr
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: