identity-idp
identity-idp copied to clipboard
Always assign error_details for FormResponse with ActiveModel::Errors
🛠 Summary of changes
Updates FormResponse to always include error_details in its serialized hash form, as long as the errors object is an instance of ActiveModel::Errors.
This is a continuation of the discussion at https://github.com/18F/identity-idp/pull/10132#discussion_r1499273060 , where error_details's unpredictable presence requires accommodation via default values in method signatures. By always assigning a value, these defaults can be removed.
Draft: Unsure the full impact of these changes, awaiting test results.
📜 Testing Plan
TBD