feat/verify-email #40

Merged
eliott merged 2 commits from feat/verify-email into develop 2026-05-11 22:32:41 +02:00
Owner
No description provided.
The middleware was silently mapping any unhandled exception to 500 with
no log line, which made debugging real failures (e.g. an S3 PutObject
throwing NoSuchBucket) impossible from the API's stdout. Inject
ILogger<ErrorHandlingMiddleware> and LogError on >=500 so the stack
trace surfaces in `dotnet run`.
SeaweedFS does not auto-create buckets on PutObject — a fresh dev or
prod deployment with SEAWEEDFS_S3_BUCKET set to a name that was never
manually CreateBucket'd fails every upload with NoSuchBucket. The
controller's error middleware then maps this to a generic 500 ("Une
erreur est survenue" on the frontend).

Add a lazy, thread-safe EnsureBucketAsync() that runs once on the first
UploadAsync call. PutBucketAsync is idempotent on its happy path, and
BucketAlreadyOwnedByYou / BucketAlreadyExists are swallowed in case
something else provisioned the bucket between deployment and first
write. Guarded with a SemaphoreSlim so concurrent first-uploads do not
race the create.

No new dependencies; no migration touched.
eliott merged commit 2cf89e497a into develop 2026-05-11 22:32:41 +02:00
eliott deleted branch feat/verify-email 2026-05-11 22:32:41 +02:00
Commenting is not possible because the repository is archived.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
cda-solutions/resources-relationnelles-api!40
No description provided.