Fix response status code in userFormController of OpenMRS LegacyUI

Hello Everyone,

The handleSubmission method in returns 2XX as response code even when there is an error on POST.

We propose to fix it to follow HTTP Response code standards and return 201 on successful creation and on error 400 would be returned as response code.

cc @mksd @sukreet @rrameshbtech

Can you attach the screenshort of the error please

Hi Sharif

The response code is 200 even if there is error on completing user creation. On error we expect error code.

Have you tried to test on demo server and see whether this error occur as the same

Its a valid error, the issue we are fixing is the response code when error occurs

Take a note that we are shifting from old legacyui to new Ui of gsp. So i would advise to first check the new ui in reference appication and see if there is work done in reference to old legacyui. You never know this may have been improved in the new Ui thanks

1 Like

Thanks for the information

1 Like