mimic stripe error api