{"size": 617, "ext": "js", "max_stars_repo_path": "packages/app/src/Errors/PermissionsError.js", "max_stars_repo_name": "jjgumucio/orionjs", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "packages/app/src/Errors/PermissionsError.js", "max_issues_repo_name": "jjgumucio/orionjs", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "packages/app/src/Errors/PermissionsError.js", "max_forks_repo_name": "jjgumucio/orionjs", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 26.8260869565, "max_line_length": 98, "alphanum_fraction": 0.6564019449}
export default class PermissionsError extends Error {
  constructor(permissionErrorType, otherInfo = {}) {
    // Calling parent constructor of base Error class.
    const message =
      otherInfo.message || `Client is not allowed to perform this action [${permissionErrorType}]`
    super(message)
    Error.captureStackTrace(this, this.constructor)

    this.isOrionError = true
    this.code = PermissionsError
    this.otherInfo = otherInfo

    this.getInfo = () => {
      return {
        ...otherInfo,
        error: 'PermissionsError',
        message,
        type: permissionErrorType
      }
    }
  }
}
