open-vault/ui/app/lib/control-group-error.js
Hamid Ghaf 27bb03bbc0
adding copyright header (#19555)
* adding copyright header

* fix fmt and a test
2023-03-15 09:00:52 -07:00

22 lines
575 B
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import AdapterError from '@ember-data/adapter/error';
export default class ControlGroupError extends AdapterError {
constructor(wrapInfo) {
const { accessor, creation_path, creation_time, token, ttl } = wrapInfo;
super();
this.message = 'Control Group encountered';
// add items from the wrapInfo object to the error
this.token = token;
this.accessor = accessor;
this.creation_path = creation_path;
this.creation_time = creation_time;
this.ttl = ttl;
}
}