I have a case where I get errors back from an API JSON. I want to pass those along in the error messages, but I can't just add_error(err["key"].as_s, err["val"].as_s), and there's no way to convert JSON to Symbol, or a String to a Symbol.
The big issue here is that it becomes a major breaking change to allow both Symbol and String. I'm not sure what the solution is here, but we should definitely make this more flexible.
https://github.com/luckyframework/avram/blob/a604962a50f630d58b85c88e1efd5e73fbdb09f8/src/avram/operation_errors.cr#L19
I have a case where I get errors back from an API JSON. I want to pass those along in the error messages, but I can't just
add_error(err["key"].as_s, err["val"].as_s)
, and there's no way to convert JSON to Symbol, or a String to a Symbol.The big issue here is that it becomes a major breaking change to allow both Symbol and String. I'm not sure what the solution is here, but we should definitely make this more flexible.