Well, actually, I am using only one div 'spc-error-response' (the id value is not exactly right). Irrespective of the type of error we get, we just display in that div.

So, in that way, I wrote the message in js