"""Lambda Handler.""" from payments_posted.error_handling import OwsServiceException from payments_posted.logging import app_logger from payments_posted.processor import PaymentPostedProcessor from payments_posted.sentry import capture_exception def handler(event, context): """Lambda entry point.""" try: processor = PaymentPostedProcessor(event) processor.process() return {'status': 'OK'} except OwsServiceException as e: app_logger.error(str(e)) capture_exception(e) raise e except Exception as e: capture_exception(e) raise e