<commit_before>var azure = require('azure-storage'),
    fs = require('fs');

function Azure(options) {
  this.options = options;

  this.getUrl = this.getUrl.bind(this);
  this.save = this.save.bind(this);
}

Azure.defaults = {
  storageAccount: '',
  storageContainer: '',
  storageAccessKey: ''
}

Azure.prototype.getUrl = function(file) {
  return 'https://#{account}.blob.core.windows.net/#{container}/#{id}/#{name}'
    .replace('#{account}', this.options.storageAccount)
    .replace('#{container}', this.options.storageContainer)
    .replace('#{id}', file._id)
    .replace('#{name}', file.name);
};

Azure.prototype.save = function(options, callback) {
  var that = this,
      file = options.file,
      doc = options.doc,
      fileFolder = doc._id,
      filePath = fileFolder + '/' + doc.name,
      containerAccessLevel = 'blob', //allows anonymous read access to blob content and metadata within this container, but not to container metadata such as listing all blobs within a container.
      storageAccount = this.options.storageAccount,
      storageAccessKey = this.options.storageAccessKey,
      storageContainer = this.options.storageContainer,
      blobService,
      stream;

  if(!storageAccount || !storageAccessKey || !storageContainer) {
    return callback('lets-chat-azure: Mandatory configuration fields are missing.')
  }

  try{
    blobService = azure.createBlobService(storageAccount, storageAccessKey);
  }
  catch(err) {
    callback(err);
  }<commit_msg>Fixed missing return in catch block<commit_after>var azure = require('azure-storage'),
    fs = require('fs');

function Azure(options) {
  this.options = options;

  this.getUrl = this.getUrl.bind(this);
  this.save = this.save.bind(this);
}

Azure.defaults = {
  storageAccount: '',
  storageContainer: '',
  storageAccessKey: ''
}

Azure.prototype.getUrl = function(file) {
  return 'https://#{account}.blob.core.windows.net/#{container}/#{id}/#{name}'
    .replace('#{account}', this.options.storageAccount)
    .replace('#{container}', this.options.storageContainer)
    .replace('#{id}', file._id)
    .replace('#{name}', file.name);
};

Azure.prototype.save = function(options, callback) {
  var that = this,
      file = options.file,
      doc = options.doc,
      fileFolder = doc._id,
      filePath = fileFolder + '/' + doc.name,
      containerAccessLevel = 'blob', //allows anonymous read access to blob content and metadata within this container, but not to container metadata such as listing all blobs within a container.
      storageAccount = this.options.storageAccount,
      storageAccessKey = this.options.storageAccessKey,
      storageContainer = this.options.storageContainer,
      blobService,
      stream;

  if(!storageAccount || !storageAccessKey || !storageContainer) {
    return callback('lets-chat-azure: Mandatory configuration fields are missing.')
  }

  try {
    blobService = azure.createBlobService(storageAccount, storageAccessKey);
  }
  catch(err) {
    return callback(err);
  }
{'fraction_non_alphanumeric': 0.13850231941683233, 'fraction_numerical': 0.0, 'mean_word_length': 3.8226837060702876, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1295986', 'n_tokens_mistral': 867, 'n_tokens_neox': 871, 'n_words': 196}