Uploaded image for project: 'integration-test'
  1. integration-test
  2. INTTEST-46

Make exceptions more informative

    XMLWordPrintable

Details

    • Improvement
    • Status: Open
    • Medium
    • Resolution: Unresolved
    • None
    • None
    • None

    Description

      Here and in other places, if an exception occurs, not enough information is logged. It can changed to something like

      try:
         ...
      except Exception as e:
          print("{} :- {}".format(type(e), e))
          print('Unable to push data to ElasticSearch')
      

      When I ran this code, I got a type error because in Python 3 the json.loads expects a decoded string and not bytes (which was fine in python 2). Any other type of exception might occur hence this is a good thing to add.

       

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            dibyadas998 Dibya Prakash Das
            dibyadas998 Dibya Prakash Das
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: