Skip to content

Commit 67a58d5

Browse files
committed
Remove redundant exception handling in ModelHandler
1 parent 39a046b commit 67a58d5

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

server/src/uds/REST/model/master/__init__.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -198,15 +198,10 @@ def process_detail(self) -> typing.Any:
198198
method = getattr(detail_handler, self._operation)
199199

200200
return method()
201-
except self.MODEL.DoesNotExist:
202-
raise exceptions.rest.NotFound('Item not found on model {self.MODEL.__name__}')
203201
except (KeyError, AttributeError) as e:
204202
raise exceptions.rest.InvalidMethodError(f'Invalid method {self._operation}') from e
205203
except exceptions.rest.HandlerError:
206204
raise
207-
except Exception as e:
208-
logger.error('Exception processing detail: %s', e)
209-
raise exceptions.rest.RequestError(f'Error processing detail: {e}') from e
210205

211206
# Data related
212207
def get_item(self, item: models.Model) -> types.rest.T_Item:

0 commit comments

Comments
 (0)