Code towards returning error msg based on exception from server to client instead of simply error-code