Is there a way for me to create custom responses for all my controllers in Nestjs?
My desired response format is as follows: For successful responses:
{
status: string,
code: number,
message: string
data: object | array | any,
request: {
url: string,
method: string
}
}
For exception cases:
{
status: string,
code: number,
message: string
error: object | array | any,
request: {
url: string,
method: string
}
}
How can I go about implementing this structure in Nestjs?