notFoundResponse(request):
→ hou.webServer.Response
This convenience function automatically sets the response code to 404 and generates an error message to indicate the requested resource was not found or does not exist.
import hou @hou.webServer.urlHandler("/node/info/", is_prefix=True) def node_info(request): path = request.path() assert path.startswith("/node/info") node_path = path[10:] node = hou.node(node_path) if node is None: return hou.webServer.notFoundResponse(request) # ...
See also |