handle parse errors

This commit is contained in:
2026-02-16 04:49:10 -05:00
parent 96896a0f97
commit 4b8e424085
2 changed files with 13 additions and 5 deletions

View File

@@ -405,13 +405,13 @@ parse_expression_attribute_names :: proc(request_body: []byte) -> Maybe(map[stri
parse_expression_attribute_values :: proc(request_body: []byte) -> (map[string]Attribute_Value, bool) {
data, parse_err := json.parse(request_body, allocator = context.temp_allocator)
if parse_err != nil {
return make(map[string]Attribute_Value), true
return make(map[string]Attribute_Value), false
}
defer json.destroy_value(data)
root, ok := data.(json.Object)
if !ok {
return make(map[string]Attribute_Value), true
return make(map[string]Attribute_Value), false
}
values_val, found := root["ExpressionAttributeValues"]
@@ -421,7 +421,7 @@ parse_expression_attribute_values :: proc(request_body: []byte) -> (map[string]A
values_obj, values_ok := values_val.(json.Object)
if !values_ok {
return make(map[string]Attribute_Value), true
return make(map[string]Attribute_Value), false
}
result := make(map[string]Attribute_Value)