omise / omise-android

Omise Android SDK
https://docs.opn.ooo
Other
50 stars 32 forks source link

Replace strings with enums #289

Closed AnasNaouchi closed 11 months ago

AnasNaouchi commented 11 months ago

In the current Netcetera POC branch, we raise errors like OmiseException("Authentication failed.", e)) and sometimes like OmiseException("Authentication failed", e) (note presence of period . on first example).

In Fallback to web flow in case Netcetera 3DS SDK fails by AnasNaouchi · Pull Request #286 · omise/omise-android we do certain actions based on exception raised; the lack of restriction on allowed values will likely lead to bugs.

This PR replaces literal strings with enums where possible.

sonarcloud[bot] commented 11 months ago

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

68.8% 68.8% Coverage
0.0% 0.0% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint