anishek/pooja | #2264 | returning error codes when something goes wrong.