private void handleChannelInfoResultError(String stream,RequestType type,int responseCode){
  if (type == RequestType.CHANNEL) {
    if (responseCode == 404) {
      resultListener.receivedChannelInfo(stream,null,RequestResult.NOT_FOUND);
    }
 else {
      resultListener.receivedChannelInfo(stream,null,RequestResult.FAILED);
    }
  }
 else {
    if (responseCode == 404) {
      resultListener.putChannelInfoResult(RequestResult.NOT_FOUND);
    }
 else     if (responseCode == 401 || responseCode == 403) {
      LOGGER.warning("Error setting channel info: Access denied");
      resultListener.putChannelInfoResult(RequestResult.ACCESS_DENIED);
      accessDenied();
    }
 else     if (responseCode == 422) {
      LOGGER.warning("Error setting channel info: Probably invalid title");
      resultListener.putChannelInfoResult(RequestResult.INVALID_STREAM_STATUS);
    }
 else {
      LOGGER.warning("Error setting channel info: Unknown error (" + responseCode + ")");
      resultListener.putChannelInfoResult(RequestResult.FAILED);
    }
  }
}

private void handleChannelInfoResultError ( String stream , RequestType type , int responseCode ) { if ( type == RequestType . CHANNEL ) { if ( responseCode == 404 ) { resultListener . receivedChannelInfo ( stream , null , RequestResult . NOT_FOUND ) ; } else { resultListener . receivedChannelInfo ( stream , null , RequestResult . FAILED ) ; } } else { if ( responseCode == 404 ) { resultListener . putChannelInfoResult ( RequestResult . NOT_FOUND ) ; } else if ( responseCode == 401 || responseCode == 403 ) { LOGGER . warning ( "Error setting channel info: Access denied" ) ; resultListener . putChannelInfoResult ( RequestResult . ACCESS_DENIED ) ; accessDenied ( ) ; } else if ( responseCode == 422 ) { LOGGER . warning ( "Error setting channel info: Probably invalid title" ) ; resultListener . putChannelInfoResult ( RequestResult . INVALID_STREAM_STATUS ) ; } else { LOGGER . warning ( "Error setting channel info: Unknown error (" + responseCode + ")" ) ; resultListener . putChannelInfoResult ( RequestResult . FAILED ) ; } } }
handle the error of a channelinfo request result , this can be from changing the channel info as well . handle by logging the error as well as informing the client who can inform the user on the gui .
