Welcome to the WSO2 Identity Server source code! For info on working with the WSO2 Identity Server repository and contributing code, click the link below.
Describe the issue:
Even if the resend code API failed to send the code in an attempt it returns 201 as the HTTP status code. Expected it will indicate a failure.
How to reproduce:
Call the resend API for an unsupported scenario.
Expected behavior:
Provide an indication of the error status in the HTTP status code.
Describe the issue: Even if the resend code API failed to send the code in an attempt it returns 201 as the HTTP status code. Expected it will indicate a failure.
How to reproduce: Call the resend API for an unsupported scenario.
Expected behavior: Provide an indication of the error status in the HTTP status code.
Code - https://github.com/wso2-extensions/identity-governance/blob/master/components/org.wso2.carbon.identity.user.endpoint/src/main/java/org/wso2/carbon/identity/user/endpoint/impl/ResendCodeApiServiceImpl.java#L66-L67