function error(type) {
  var result = void 0;

  type = (type + '').replace(/#|!|\?/g, '');

  if (errors[type]) {
    result = errors[type];
  }

  return result ? result : null;
}
Return error type based on provided error id.

@param {String} type Error type.
@returns {String|null} Returns error id.