File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 1
1
import {
2
2
Controller ,
3
3
Post ,
4
- BadRequestException ,
5
4
Req ,
6
5
RawBodyRequest ,
6
+ ForbiddenException ,
7
7
} from '@nestjs/common' ;
8
8
import { ApiTags } from '@nestjs/swagger' ;
9
9
import { TrolleyService } from './trolley/trolley.service' ;
@@ -24,7 +24,7 @@ export class WebhooksController {
24
24
*
25
25
* @param request - The incoming webhook request containing headers, raw body, and parsed body.
26
26
* @returns A success message if the webhook is processed successfully.
27
- * @throws {BadRequestException } If the signature is invalid or the webhook has already been processed.
27
+ * @throws {ForbiddenException } If the signature is invalid or the webhook has already been processed.
28
28
*/
29
29
@Post ( 'trolley' )
30
30
async handleTrolleyWebhook ( @Req ( ) request : RawBodyRequest < Request > ) {
@@ -34,7 +34,7 @@ export class WebhooksController {
34
34
request . rawBody ?. toString ( 'utf-8' ) ?? '' ,
35
35
)
36
36
) {
37
- throw new BadRequestException ( 'Missing or invalid signature!' ) ;
37
+ throw new ForbiddenException ( 'Missing or invalid signature!' ) ;
38
38
}
39
39
40
40
// do not proceed any further if event has already been processed
You can’t perform that action at this time.
0 commit comments