checking for different status codes in some cases that would indicate a successful server call