Skip to content

fix(hospital-registry): replace panics with typed ContractError variants#201

Merged
Emeka000 merged 1 commit intoHealthy-Stellar:mainfrom
Mozez155:fix/172-hospital-registry-typed-errors
Mar 30, 2026
Merged

fix(hospital-registry): replace panics with typed ContractError variants#201
Emeka000 merged 1 commit intoHealthy-Stellar:mainfrom
Mozez155:fix/172-hospital-registry-typed-errors

Conversation

@Mozez155
Copy link
Copy Markdown

Closes #172

  • Add ContractError enum with HospitalAlreadyRegistered, HospitalNotFound, HospitalConfigNotFound
  • Convert register_hospital, update_hospital, get_hospital, set_hospital_config, get_hospital_config and all update_* methods to return Result<_, ContractError>
  • Update tests to assert exact error variants via try_* client methods

Closes Healthy-Stellar#172

- Add ContractError enum with HospitalAlreadyRegistered, HospitalNotFound, HospitalConfigNotFound
- Convert register_hospital, update_hospital, get_hospital, set_hospital_config,
  get_hospital_config and all update_* methods to return Result<_, ContractError>
- Update tests to assert exact error variants via try_* client methods
@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 30, 2026

@Mozez155 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Emeka000 Emeka000 merged commit ee02eab into Healthy-Stellar:main Mar 30, 2026
1 check passed
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.

Replace panic-based existence checks in hospital-registry

2 participants