create error callback for createAnswer function