Fixes issue where error is thrown when socket returns null body

When the result is null, this code will throw an error. Added default status so it will at least use default case in switch statement.