mirror of
https://github.com/floci-io/floci.git
synced 2026-12-05 19:18:01 -05:00
Every ConflictException, ResourceNotFoundException, and ServiceQuotaExceededException the service threw carried a message only, but the wire model declares resourceId/resourceType on all three, and the AWS SDK exposes them as typed accessors. Populate them consistently using the resource's locally-unique name (domain name, repository name, package version, or asset name) as resourceId. Populating resourceId this way exposed a real crash: Map.of() rejects null values, so any request missing a required identifier (domain, repository, package, packageVersion, asset) turned what used to be a wrong-status ResourceNotFoundException into a raw NullPointerException / HTTP 500. Fixed by validating required identifiers up front (returning ValidationException, matching AWS) and by making the extendedData-building helper itself null-safe against a missing resourceId, so no single overlooked call site can reintroduce a 500.