Internal server error while publishing api to gateway