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",
|
logLevel: "info",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
[
|
||||||
|
"ENDPOINT_NOT_FOUND",
|
||||||
|
{
|
||||||
|
code: "VAL_003",
|
||||||
|
publicMessage: "The requested resource was not found",
|
||||||
|
logLevel: "info",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
|
||||||
// Business Logic Errors
|
// 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
|
// Validation patterns
|
||||||
{
|
{
|
||||||
pattern: /invalid|required|missing|validation|format/i,
|
pattern: /invalid|required|missing|validation|format/i,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user