Core: Add param for user to provide custom responseTransformer

Current case only handles success response, allow users to handle
error responses as valid responses