mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-19 16:03:02 +00:00
[CST-4880] Set 500 response status to internal server error page
This commit is contained in:
@@ -31,4 +31,8 @@ export class ServerResponseService {
|
|||||||
setNotFound(message = 'Not found'): this {
|
setNotFound(message = 'Not found'): this {
|
||||||
return this.setStatus(404, message);
|
return this.setStatus(404, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setInternalServerError(message = 'Internal Server Error'): this {
|
||||||
|
return this.setStatus(500, message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,7 +1,8 @@
|
|||||||
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
||||||
|
import { ServerResponseService } from '../core/services/server-response.service';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This component representing the `PageNotFound` DSpace page.
|
* This component representing the `PageInternalServer` DSpace page.
|
||||||
*/
|
*/
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ds-page-internal-server-error',
|
selector: 'ds-page-internal-server-error',
|
||||||
@@ -10,4 +11,13 @@ import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|||||||
changeDetection: ChangeDetectionStrategy.Default
|
changeDetection: ChangeDetectionStrategy.Default
|
||||||
})
|
})
|
||||||
export class PageInternalServerErrorComponent {
|
export class PageInternalServerErrorComponent {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialize instance variables
|
||||||
|
*
|
||||||
|
* @param {ServerResponseService} responseService
|
||||||
|
*/
|
||||||
|
constructor(private responseService: ServerResponseService) {
|
||||||
|
this.responseService.setInternalServerError();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user