SQS: DeletePersist возвращает ошибку (500 при сбое Redis), fail-fast загрузка очередей, дефолты атрибутов при CreateQueue, защита SqsErrors от nil-deref
This commit is contained in:
+5
-1
@@ -83,7 +83,11 @@ func ExtractQueueAttributes(u url.Values) map[string]string {
|
||||
// CreateErrorResponseV1 — формирует SQS error response по ключу ошибки.
|
||||
// Параметр isSqs оставлен для обратной совместимости (всегда true).
|
||||
func CreateErrorResponseV1(errKey string, isSqs bool) (int, interfaces.AbstractResponseBody) {
|
||||
err := models.SqsErrors[errKey]
|
||||
err, ok := models.SqsErrors[errKey]
|
||||
if !ok {
|
||||
// Неизвестный ключ → InternalError вместо nil-deref (ревью 2026-10-11).
|
||||
err = models.SqsErrors["InternalError"]
|
||||
}
|
||||
|
||||
respStruct := models.ErrorResponse{
|
||||
Result: err.Response(),
|
||||
|
||||
Reference in New Issue
Block a user