Angular Portal error on search: An error occurred while processing your request.

When we are trying to search for any string on out of the box functionalities in Angular Portal, it throws an error: An error occurred while processing your request.

Upon debugging/inspect the code, it shows error 500 Failed to load resource: the server responded with a status of 500 ().

the error is only coming upon search, while other pages api's are rendering fine.

Kindly suggest what can be done to resolve such error.