Depending on the severity of your presenting symptoms you can decide or not whether to go to the hospital. If the side effects are minor as you say, then there is no need for hospital. You have to be sure that your symptoms are not due to another cause order than the erythromycin
( by relating the in take with occurrence of symptoms). Most side effects can ware off after taking the erythromycin for a few days and you can continue the course of antibiotics as prescribed by your doctor.
You consult a physician if serious symptoms present.
Wish you a quick recovery