Commit 7faeb910 authored by raju249's avatar raju249

Add status 422 in case of errors only

parent 1d7bcbf3
......@@ -63,7 +63,11 @@ module NotesActions
json.merge!(note_json(@note))
end
render json: json
if notes.errors && notes.errors.keys != [:commands_only]
render json: json, status: 422
else
render json: json
end
end
format.html { redirect_back_or_default }
end
......
---
title: Return 422 status code in case of error in submitting comments
merge_request: 19276
author:
type: added
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment