diff sat/core/exceptions.py @ 3880:03761f8ba8bb

component AP gateway: raise exceptions on apGet + fix exceptions catching in apGetLocalObject: new `exceptions.ExternalRequestError` is raised when request done `apGet` has a return code >= 300. Fix wrong exception catched in `apGetLocalObject`.
author Goffi <goffi@goffi.org>
date Wed, 31 Aug 2022 17:07:01 +0200
parents a8c7e5cef0cb
children e345d93fb6e5
line wrap: on
line diff
--- a/sat/core/exceptions.py	Wed Aug 31 13:18:56 2022 +0200
+++ b/sat/core/exceptions.py	Wed Aug 31 17:07:01 2022 +0200
@@ -77,6 +77,10 @@
     pass
 
 
+class ExternalRequestError(Exception):
+    """Request to third party server failed"""
+
+
 class ConflictError(Exception):
     pass