Do not log errors in the server side
Browse files- api/resources/root.py +2 -4
api/resources/root.py
CHANGED
@@ -29,11 +29,9 @@ class RootResource:
|
|
29 |
'passed': passed,
|
30 |
'output': output,
|
31 |
}
|
32 |
-
except FileNotFoundError
|
33 |
-
logging.error('Task not found: {}'.format(str(e)))
|
34 |
response.status = falcon.HTTP_404
|
35 |
response.media = {'error': 'Task not found'}
|
36 |
-
except Exception
|
37 |
-
logging.error('Error processing request: {}'.format(str(e)))
|
38 |
response.status = falcon.HTTP_500
|
39 |
response.media = {'error': 'Internal server error'}
|
|
|
29 |
'passed': passed,
|
30 |
'output': output,
|
31 |
}
|
32 |
+
except FileNotFoundError:
|
|
|
33 |
response.status = falcon.HTTP_404
|
34 |
response.media = {'error': 'Task not found'}
|
35 |
+
except Exception:
|
|
|
36 |
response.status = falcon.HTTP_500
|
37 |
response.media = {'error': 'Internal server error'}
|