exception handling for empty response