Adding proper error and success responses