ClassMethod CreateApplication() As %Status [ CodeMode = objectgenerator ]
{
Set $ZTrap="Error"
Set sc=$$$OK
Write !,"Creating Mitz API",!
Set Here=$Namespace
Set URL="/mitz"
Set $Namespace="%SYS"
If ##class(Security.Applications).Exists(URL) {
Write "Mitz API already exists",!
Else {
Set Props("Name")=URL
Set Props("NameSpace")=Here
Set Props("Description")="Mitz notificatie API endpoint"
Set Props("AutheEnabled")=64
Set Props("DispatchClass")="LSP.Mitz.API"
Set Props("MatchRoles")=":%All"
Set Props("Type")=2 ; CSP App
Set sc=##class(Security.Applications).Create(URL,.Props)
}
Set $Namespace=Here
Return sc
Error
Set $ZTrap=""
If $Data(Here) Set $Namespace=Here
Return $$$ERROR($$$GeneralError,"ErrorTrap: "_$ZError)
}

You only need Try-Catch when you expect that something might go wrong and can't handle it upfront.
For regular error-handling, something that you anticipate never happens, the $ZTrap-ErrorHandler is much more elegant. It doesn't introduce extra stack-levels and identation.

%Status is an elegant way of letting the caller know something went wrong and leave it to it's discretion to do with it whatever is appropriate, the callee should have done anything to handle the 'error' properly, logging, recovery, whatever. It's a matter of seperation of concerns.

About RESTfull...

/search isn't really RESTfull, REST works on Resources (e.g. /persons or /orders)

To query Resources you use GET (with parameters)

But this is all very 'religious'. To use POST for a complex query is IMO defendable, but then I would do that on a Resource.

You should have a look at the OData (Oasis) specification: https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=odata