add forgot endpoint

This commit is contained in:
2025-12-04 15:39:44 -03:00
parent c3917addfa
commit d29ad3ceb6
14 changed files with 267 additions and 30 deletions

View File

@@ -1,9 +1,10 @@
from decimal import Decimal
from http import HTTPStatus
from aws_lambda_powertools import Logger
from aws_lambda_powertools.event_handler.exceptions import (
BadRequestError,
NotFoundError,
ServiceError,
)
from layercake.dateutils import now, ttl
from layercake.dynamodb import DynamoDBPersistenceLayer, KeyPair, SortKey, TransactKey
@@ -351,6 +352,6 @@ class EnrollmentNotFoundError(NotFoundError):
super().__init__('Enrollment not found')
class EnrollmentConflictError(BadRequestError):
class EnrollmentConflictError(ServiceError):
def __init__(self, *_):
super().__init__('Enrollment status conflict')
super().__init__(HTTPStatus.CONFLICT, 'Enrollment status conflict')