Return a success message when successful

It used to return an error message even though it was successful.