Skip to content

Commit

Permalink
ADM-652[frontend][backend] update error message
Browse files Browse the repository at this point in the history
  • Loading branch information
guzhongren committed Jan 11, 2024
1 parent e904f96 commit 0219d5c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ Exception Table
<tr>
<td rowspan="3">404</td>
<td>Failed to get BuildKite info_status: 404...</td>
<td rowspan="3">404 Not Found</td>
<td rowspan="3">Not found</td>
</tr>
<tr>
<td>Failed to get GitHub info_status: 404...</td>
Expand All @@ -164,7 +164,7 @@ Exception Table
<tr>
<td rowspan="3">500</td>
<td>Report time expires</td>
<td rowspan="3">Generate report failed</td>
<td rowspan="3">Failed to generate report</td>
</tr>
<tr>
<td>Failed to write report file</td>
Expand All @@ -175,7 +175,7 @@ Exception Table
<tr>
<td rowspan="3">503</td>
<td>Failed to get BuildKite info_status: 503...</td>
<td rowspan="3">Service Unavailable</td>
<td rowspan="3">Service unavailable</td>
</tr>
<tr>
<td>Failed to get GitHub info_status: 503...</td>
Expand Down Expand Up @@ -208,7 +208,7 @@ group async process board related metrics
activate Jira
Jira --> Backend: Jira raw
deactivate Jira
Backend -> Backend: calculate metrics for velocity, cicle time and classification
Backend -> Backend: calculate metrics for velocity, cycle time and classification
Backend -> Backend: generate board report csv
deactivate Backend
note left
Expand Down
6 changes: 5 additions & 1 deletion frontend/__tests__/src/client/CSVClient.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ describe('verify export csv', () => {
});

it('should throw error when export csv request status 500', async () => {
server.use(rest.get(MOCK_EXPORT_CSV_URL, (req, res, ctx) => res(ctx.status(HttpStatusCode.InternalServerError))));
server.use(
rest.get(MOCK_EXPORT_CSV_URL, (req, res, ctx) =>
res(ctx.status(HttpStatusCode.InternalServerError, VERIFY_ERROR_MESSAGE.INTERNAL_SERVER_ERROR))
)
);

await expect(async () => {
await csvClient.exportCSVData(MOCK_EXPORT_CSV_REQUEST_PARAMS);
Expand Down
6 changes: 3 additions & 3 deletions frontend/__tests__/src/fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ export const VERSION_RESPONSE = {
export enum VERIFY_ERROR_MESSAGE {
BAD_REQUEST = 'Please reconfirm the input',
UNAUTHORIZED = 'Token is incorrect',
INTERNAL_SERVER_ERROR = 'Internal Server Error',
NOT_FOUND = '404 Not Found',
INTERNAL_SERVER_ERROR = 'Internal server error',
NOT_FOUND = 'Not found',
PERMISSION_DENIED = 'Permission denied',
REQUEST_TIMEOUT = 'Request Timeout',
UNKNOWN = 'Unknown',
Expand Down Expand Up @@ -692,7 +692,7 @@ export const CLASSIFICATION_WARNING_MESSAGE = `Some classifications in import da
export const HOME_VERIFY_IMPORT_WARNING_MESSAGE =
'The content of the imported JSON file is empty. Please confirm carefully';

export const INTERNAL_SERVER_ERROR_MESSAGE = 'Internal Server Error';
export const INTERNAL_SERVER_ERROR_MESSAGE = 'Internal server error';

export const BASE_PAGE_ROUTE = '/';

Expand Down
2 changes: 1 addition & 1 deletion frontend/cypress/pages/metrics/metrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export class Metrics {
}

get buildKiteStepNotFoundTips() {
return cy.contains('BuildKite get steps failed: 404 Not Found');
return cy.contains('BuildKite get steps failed: Not found');
}

get pipelineRemoveButton() {
Expand Down

0 comments on commit 0219d5c

Please sign in to comment.