fix(plugins/pagerduty): use NotFoundError from @backstage/errors
Signed-off-by: Alec Jacobs <cajacobs5401@gmail.com>
This commit is contained in:
@@ -32,9 +32,9 @@ import {
|
||||
ConfigApi,
|
||||
FetchApi,
|
||||
} from '@backstage/core-plugin-api';
|
||||
import { NotFoundError } from '@backstage/errors';
|
||||
|
||||
export class UnauthorizedError extends Error {}
|
||||
export class NotFoundError extends Error {}
|
||||
|
||||
export const pagerDutyApiRef = createApiRef<PagerDutyApi>({
|
||||
id: 'plugin.pagerduty.api',
|
||||
|
||||
@@ -14,10 +14,5 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export {
|
||||
PagerDutyClient,
|
||||
pagerDutyApiRef,
|
||||
UnauthorizedError,
|
||||
NotFoundError,
|
||||
} from './client';
|
||||
export { PagerDutyClient, pagerDutyApiRef, UnauthorizedError } from './client';
|
||||
export type { PagerDutyApi } from './types';
|
||||
|
||||
@@ -18,11 +18,11 @@ import { render, waitFor, fireEvent, act } from '@testing-library/react';
|
||||
import { PagerDutyCard, isPluginApplicableToEntity } from '../PagerDutyCard';
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
import { EntityProvider } from '@backstage/plugin-catalog-react';
|
||||
import { NotFoundError } from '@backstage/errors';
|
||||
import { TestApiRegistry, wrapInTestApp } from '@backstage/test-utils';
|
||||
import {
|
||||
pagerDutyApiRef,
|
||||
UnauthorizedError,
|
||||
NotFoundError,
|
||||
PagerDutyClient,
|
||||
} from '../../api';
|
||||
import { Service, User } from '../types';
|
||||
|
||||
@@ -20,7 +20,7 @@ import { Incidents } from '../Incident';
|
||||
import { EscalationPolicy } from '../Escalation';
|
||||
import useAsync from 'react-use/lib/useAsync';
|
||||
import { Alert } from '@material-ui/lab';
|
||||
import { pagerDutyApiRef, UnauthorizedError, NotFoundError } from '../../api';
|
||||
import { pagerDutyApiRef, UnauthorizedError } from '../../api';
|
||||
import AlarmAddIcon from '@material-ui/icons/AlarmAdd';
|
||||
import { MissingTokenError, ServiceNotFoundError } from '../Errors';
|
||||
import WebIcon from '@material-ui/icons/Web';
|
||||
@@ -32,6 +32,7 @@ import { ChangeEvents } from '../ChangeEvents';
|
||||
import { Service } from '../types';
|
||||
|
||||
import { useApi } from '@backstage/core-plugin-api';
|
||||
import { NotFoundError } from '@backstage/errors';
|
||||
import {
|
||||
Progress,
|
||||
HeaderIconLinkRow,
|
||||
|
||||
Reference in New Issue
Block a user