refactor: integrate heromodels RPC with heroserver
- Integrate heromodels RPC as a handler within heroserver - Update API endpoint to use standard JSON-RPC format - Add generated curl examples with copy button to docs - Improve error handling to return JSON-RPC errors - Simplify heromodels server example script
This commit is contained in:
@@ -145,5 +145,8 @@ pub fn (handler Handler) handle(request Request) !Response {
|
||||
}
|
||||
|
||||
// Execute the procedure handler with the request payload
|
||||
return procedure_func(request) or { panic(err) }
|
||||
return procedure_func(request) or {
|
||||
// Return proper JSON-RPC error instead of panicking
|
||||
return new_error(request.id, internal_error)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user