MCPcopy Index your code
hub / github.com/ParallelTask/dinoloop / TestController

Class TestController

tests/integration/http.exception.spec.ts:26–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24}
25
26@Controller('/test')
27class TestController extends ApiController {
28 @HttpGet('/throwSync')
29 throwSync(): any {
30 throw new HttpResponseException(HttpStatusCode.internalServerError,
31 { data: 'InternalServerError' });
32 }
33
34 @Async()
35 @HttpGet('/throwAsync')
36 async throwAsync(): Promise<void> {
37 throw new HttpResponseException(HttpStatusCode.unauthorized,
38 { data: 'Unauthorized' });
39 }
40
41 @HttpGet('/badRequest')
42 requestEx(): Promise<void> {
43 throw new BadRequestException({ data: 'BadRequest' });
44 }
45}
46
47describe('http.exception.e2e.spec', () => {
48 const baseRoute = '/api/test';

Callers

nothing calls this directly

Calls 3

ControllerFunction · 0.85
HttpGetFunction · 0.85
AsyncFunction · 0.85

Tested by

no test coverage detected