generate error constants in javascript, if the service we're contacting is gone replay with SERVICE_UNAVAILABLE