Skip to content

Commit 31664cd

Browse files
authored
client: use ProblemWithMessageType (#31920)
1 parent f7c3232 commit 31664cd

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

generators/angular/templates/src/main/webapp/app/shared/alert/alert-error.spec.ts.ejs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import { TranslateModule } from '@ngx-translate/core';
3131
import { EventManager } from 'app/core/util/event-manager.service';
3232
import { AlertModel, AlertService } from 'app/core/util/alert.service';
3333
import { MESSAGE_ERROR_HEADER_NAME, MESSAGE_PARAM_HEADER_NAME } from 'app/shared/jhipster/constants';
34+
import { ProblemWithMessageType } from 'app/shared/jhipster/problem-details';
3435

3536
import { AlertError } from './alert-error';
3637

@@ -101,7 +102,7 @@ describe('Alert Error Component', () => {
101102
status: 400,
102103
statusText: 'Bad Request',
103104
error: {
104-
type: 'https://www.jhipster.tech/problem/problem-with-message',
105+
type: ProblemWithMessageType,
105106
title: 'Bad Request',
106107
status: 400,
107108
path: '/api/foos',
@@ -136,7 +137,7 @@ describe('Alert Error Component', () => {
136137
status: 400,
137138
statusText: 'Bad Request',
138139
error: {
139-
type: 'https://www.jhipster.tech/problem/problem-with-message',
140+
type: ProblemWithMessageType,
140141
title: 'Method argument not valid',
141142
status: 400,
142143
path: '/api/foos',

generators/react/templates/src/main/webapp/app/config/notification-middleware.spec.ts.ejs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import sinon from 'sinon';
2424
import { TranslatorContext } from 'react-jhipster';
2525
<%_ } _%>
2626
import { MESSAGE_ALERT_HEADER_NAME, MESSAGE_ERROR_HEADER_NAME, MESSAGE_PARAM_HEADER_NAME } from 'app/shared/jhipster/constants';
27+
import { ProblemWithMessageType } from 'app/shared/jhipster/problem-details';
2728

2829
import notificationMiddleware from './notification-middleware';
2930

@@ -57,7 +58,7 @@ describe('Notification Middleware', () => {
5758
isAxiosError: true,
5859
response: {
5960
data: {
60-
type: 'https://www.jhipster.tech/problem/problem-with-message',
61+
type: ProblemWithMessageType,
6162
title: 'Method argument not valid',
6263
status: 400,
6364
path: '/api/foos',

0 commit comments

Comments
 (0)