Skip to content

Fix 500 error on contact create with invalid ident - #2945

Open
maricavor wants to merge 1 commit into
masterfrom
fix/validate-ident-before-company-register-check
Open

Fix 500 error on contact create with invalid ident#2945
maricavor wants to merge 1 commit into
masterfrom
fix/validate-ident-before-company-register-check

Conversation

@maricavor

Copy link
Copy Markdown
Contributor

Summary

  • Fix RegNoValidator and NationalIdValidator using Country.new('EE') as hash keys — hash lookup never matched because Country lacks eql?/hash, making both validators no-ops. Replaced with string keys and record.country_code.

  • Fix maybe_validate_ident ignoring identifier.valid? result — invalid ident (e.g. EE102946871) passed through to maybe_company_is_relevant, which made a SOAP call to the Business Registry causing 'Unparseable integer' fault and EPP 2400 (Internal Server Error) instead of EPP 2005 (Parameter value syntax error).

  • Add early @error flag and EPP error generation in maybe_validate_ident to short-circuit before the SOAP call.

  • Add @error guard to maybe_company_is_relevant to skip the SOAP call when prior validation has already failed.

@maricavor
maricavor requested a review from OlegPhenomenon July 29, 2026 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant