diff --git a/scripts/ghost/migrations/init/posts.json b/scripts/ghost/migrations/init/posts.json index 4a76cf149f23b8798d1e97e284b52f0e152b2143..1cadc680a562553ff1f1b0c299eb336abbe2c5a3 100644 --- a/scripts/ghost/migrations/init/posts.json +++ b/scripts/ghost/migrations/init/posts.json @@ -684,7 +684,7 @@ "codeinjection_foot": null, "custom_template": null, "canonical_url": null, - "tags": ["Infos"], + "tags": ["Infos", "Oullins"], "authors": [ { "id": "5951f5fca366002ebd5dbef7", @@ -806,7 +806,7 @@ "codeinjection_foot": null, "custom_template": null, "canonical_url": null, - "tags": ["Ressources"], + "tags": ["Ressources", "Oullins"], "authors": [ { "id": "5951f5fca366002ebd5dbef7", diff --git a/src/posts/posts.controller.ts b/src/posts/posts.controller.ts index dcc6aecfdf61bea0931f196d5062355690b0454d..a70393a1bb8e8f47b056485e9b5a6c201ee0d51a 100644 --- a/src/posts/posts.controller.ts +++ b/src/posts/posts.controller.ts @@ -1,4 +1,4 @@ -import { Controller, Get, HttpService, Logger, Param, Query } from '@nestjs/common'; +import { Controller, Get, HttpException, HttpService, HttpStatus, Logger, Param, Query } from '@nestjs/common'; import { Observable } from 'rxjs'; import { catchError, map } from 'rxjs/operators'; import { ApiQuery } from '@nestjs/swagger'; @@ -35,8 +35,7 @@ export class PostsController { .pipe( map((response) => response.data), catchError((err) => { - Logger.error(err); - return new Observable(); + throw new HttpException('Invalid structure id', HttpStatus.BAD_REQUEST); }) ); }