mirror of
https://github.com/azaion/satellite-provider.git
synced 2026-06-26 15:01:14 +00:00
Sanitize 400 error messages in GlobalExceptionHandler and validation filters to use static strings. This change improves consistency and prevents leaking internal exception details. Updated tests to reflect new error messages for JSON parsing and bad request scenarios.
This commit is contained in:
@@ -75,9 +75,9 @@ public sealed class UavTileUploadHandler : IUavTileUploadHandler
|
||||
{
|
||||
payload = JsonSerializer.Deserialize<UavTileBatchMetadataPayload>(metadataJson, MetadataJsonOptions);
|
||||
}
|
||||
catch (JsonException ex)
|
||||
catch (JsonException)
|
||||
{
|
||||
return EnvelopeError($"Invalid `metadata` JSON: {ex.Message}");
|
||||
return EnvelopeError("`metadata` could not be parsed as JSON.");
|
||||
}
|
||||
|
||||
if (payload is null || payload.Items.Count == 0)
|
||||
|
||||
Reference in New Issue
Block a user