handle parse errors
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user