@method_decorator(logged_in_or_basicauth(AUTH_REALM))
    def get(self, request, code):

        # TODO: stabilize by removing try/except here and fixing ALL the possible issues.
        try:
            if not request.user.is_authenticated():
                log.error('ThumbnailsHandler.read attempted with unauthenticated user.')
                return Response(status=status.HTTP_401_UNAUTHORIZED)

            processor = DocumentProcessor()
            doc = processor.read(code, options={'user': request.user, 'thumbnail': True})
            if not processor.errors:
                return DMSObjectResponse(doc, thumbnail=True)
            else:
                return Response(status=status.HTTP_404_NOT_FOUND)
        except:
            log.error('ThumbnailsHandler Error: %s' - traceback.print_exc())
            raise
dataset/ETHPy150Open adlibre/Adlibre-DMS/adlibre_dms/apps/api/views.py/ThumbnailsHandler.get/operator `%` -> `-`