added "success" and "error" to be returned with every request (just like the PHP library does)