code: public static void logHttpError(StorageException ex, OperationContext opContext) {
          if (Logger.shouldLog(opContext, Log.DEBUG)) {
              try {
                  StringBuilder bld = new StringBuilder();
                  bld.append("Error response received. ");
      
                  bld.append("HttpStatusCode= ");
                  bld.append(ex.getHttpStatusCode());
                  
                  bld.append(", HttpStatusMessage= ");
                  bld.append(ex.getMessage());
      
                  bld.append(", ErrorCode= ");
                  bld.append(ex.getErrorCode());
      
                  StorageExtendedErrorInformation extendedError = ex.getExtendedErrorInformation();
                  if (extendedError != null) {
                      bld.append(", ExtendedErrorInformation= {ErrorMessage= ");
                      bld.append(extendedError.getErrorMessage());
      
                      HashMap<String, String[]> details = extendedError.getAdditionalDetails();
                      if (details != null) {
                          bld.append(", AdditionalDetails= { ");
                          for (Entry<String, String[]> detail : details.entrySet()) {
                              bld.append(detail.getKey());
                              bld.append("= ");
      
                              for (String value : detail.getValue()) {
                                  bld.append(value);
                              }
                              bld.append(",");
                          }
                          bld.setCharAt(bld.length() - 1, '}');
                      }
                      bld.append("}");
                  }
      
                  Logger.debug(opContext, bld.toString());
              } catch (Exception e) {
                  // Do nothing
              }
          }
      }
docs: Serializes the parsed StorageException. If an exception is encountered, returns empty string.
  
  @param ex
  The StorageException to serialize.
  @param opContext
  The operation context which provides the logger.