Check status code closed #1837

Added status code check