File tree Expand file tree Collapse file tree
web/server/codechecker_server Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7070LOG = get_logger ('server' )
7171
7272
73+ class ProductNotFoundError (ValueError ):
74+ pass
75+
76+
7377class RequestHandler (SimpleHTTPRequestHandler ):
7478 """
7579 Handle thrift and browser requests
@@ -319,7 +323,7 @@ def __check_prod_db(self, product_endpoint):
319323
320324 product = self .server .get_product (product_endpoint )
321325 if not product :
322- raise ValueError (
326+ raise ProductNotFoundError (
323327 f"The product with the given endpoint '{ product_endpoint } ' "
324328 "does not exist!" )
325329
@@ -510,9 +514,12 @@ def do_POST(self):
510514 import traceback
511515 traceback .print_exc ()
512516 except Exception as ex :
513- LOG .warning ("%s failed with Exception: %s" , api_info , str (ex ))
514- import traceback
515- traceback .print_exc ()
517+ if isinstance (ex , ProductNotFoundError ):
518+ LOG .debug ("%s failed with Exception: %s" , api_info , str (ex ))
519+ else :
520+ LOG .warning ("%s failed with Exception: %s" , api_info , str (ex ))
521+ import traceback
522+ traceback .print_exc ()
516523
517524 cstringio_buf = itrans .cstringio_buf .getvalue ()
518525 if cstringio_buf :
You can’t perform that action at this time.
0 commit comments