This syntax looks strange to me.  What if you just defined success and error functions and put the arguments on one line?