openBackhaul / TypeApprovalRegister

Administrates the list of approvals of Applications.
Apache License 2.0
1 stars 8 forks source link

Optimize logic for checking response status code in API /v1/regard-application #404

Closed sunil-kumar-meena closed 1 month ago

sunil-kumar-meena commented 1 month ago

In service /v1/regard-application inside regardApplicationAutomation.regardApplication we have a a below logic for if condition if (responseCode.toString() == "404" || responseCode.toString() == "408" || responseCode.toString() == "503")

Proposal: In the above code snippet, we can directly check responseCode with either 404 || 408 || 503 instead of converting it to string first. e.g if (responseCode == 404 || responseCode == 408 || responseCode == 503)

Perform the unit testing after making changes

sunil-kumar-meena commented 1 month ago

Closing it as the issue doesn't exist