fix: InvalidClientTokenId panic + VT defaults + Dockerfile config + hardcore tests (58/61)

- Add InvalidClientTokenId, ValidationError to SqsErrors (was causing panic: WriteHeader code 0)
- Extract applyEnvironmentDefaults() with defer in LoadYamlConfig (VT=30 even without config file)
- Dockerfile: copy goaws.yaml to /conf/, pass --config flag
- Fix SendMessageBatch form parsing for AWS Query Protocol
- Add hardcore_test.sh (61 tests, 14 groups)
- Remove temp debug logs from delete_message.go
This commit is contained in:
Naeel
2026-04-09 16:11:32 +03:00
parent e5b1845acf
commit 6c1aadd886
6 changed files with 764 additions and 76 deletions
+6
View File
@@ -16,6 +16,12 @@ func init() {
"MessageTooBig": {HttpError: http.StatusBadRequest, Type: "MessageTooBig", Code: "InvalidParameterValue", Message: "The message size exceeds the limit."},
"InvalidParameterValue": {HttpError: http.StatusBadRequest, Type: "InvalidParameterValue", Code: "AWS.SimpleQueueService.InvalidParameterValue", Message: "An invalid or out-of-range value was supplied for the input parameter."},
"InvalidAttributeValue": {HttpError: http.StatusBadRequest, Type: "InvalidAttributeValue", Code: "AWS.SimpleQueueService.InvalidAttributeValue", Message: "Invalid Value for the parameter RedrivePolicy."},
// InvalidClientTokenId — невалидные credentials тенанта
"InvalidClientTokenId": {HttpError: http.StatusForbidden, Type: "InvalidClientTokenId", Code: "AWS.SimpleQueueService.InvalidClientTokenId", Message: "The security token included in the request is invalid."},
// ValidationError — ошибка валидации параметров (например, VisibilityTimeout вне диапазона)
"ValidationError": {HttpError: http.StatusBadRequest, Type: "ValidationError", Code: "AWS.SimpleQueueService.ValidationError", Message: "The input fails to satisfy the constraints specified by an AWS service."},
// LimitExceeded — превышен лимит очередей тенанта (max_queues)
"LimitExceeded": {HttpError: http.StatusBadRequest, Type: "LimitExceeded", Code: "AWS.SimpleQueueService.LimitExceeded", Message: "You've reached the limit on the number of queues."},
}
SnsErrors = map[string]SnsErrorType{
"InvalidParameterValue": {HttpError: http.StatusBadRequest, Type: "InvalidParameterValue", Code: "AWS.SimpleNotificationService.InvalidParameterValue", Message: "An invalid or out-of-range value was supplied for the input parameter."},