Merge pull request #17 from NTumurbars/main
Add endpoint not found error mapping to SecureErrorMapperService
This commit is contained in:
commit
a45362c6f1
@ -205,6 +205,14 @@ export class SecureErrorMapperService {
|
||||
logLevel: "info",
|
||||
},
|
||||
],
|
||||
[
|
||||
"ENDPOINT_NOT_FOUND",
|
||||
{
|
||||
code: "VAL_003",
|
||||
publicMessage: "The requested resource was not found",
|
||||
logLevel: "info",
|
||||
},
|
||||
],
|
||||
|
||||
// Business Logic Errors
|
||||
[
|
||||
@ -357,6 +365,16 @@ export class SecureErrorMapperService {
|
||||
},
|
||||
},
|
||||
|
||||
// HTTP/Routing patterns
|
||||
{
|
||||
pattern: /^Cannot\s+(GET|POST|PUT|PATCH|DELETE|OPTIONS|HEAD)\s+/i,
|
||||
mapping: {
|
||||
code: "VAL_003",
|
||||
publicMessage: "The requested resource was not found",
|
||||
logLevel: "info",
|
||||
},
|
||||
},
|
||||
|
||||
// Validation patterns
|
||||
{
|
||||
pattern: /invalid|required|missing|validation|format/i,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user