Added hook to allow handling responses in a custom way