What will happen to the data object if 4xx or 5xx error take place? Does the program crash? does the data object get any kind of data (response error or corrupted data)? or the data object will be equal to nil?
You'll get nil
back. If you want to know the reason for failure then use:
[NSData dataWithContentsOfURL:options:error:]