app: raise an exception on duplicate endpoint registration
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
b3b60757aa
commit
94989b39dc
|
@ -323,6 +323,10 @@ class MoonrakerApp:
|
||||||
)
|
)
|
||||||
http_path = api_def.http_path
|
http_path = api_def.http_path
|
||||||
if http_path in self.registered_base_handlers:
|
if http_path in self.registered_base_handlers:
|
||||||
|
if not is_remote:
|
||||||
|
raise self.server.error(
|
||||||
|
f"Local endpoint '{endpoint}' already registered"
|
||||||
|
)
|
||||||
return
|
return
|
||||||
if TransportType.HTTP in transports:
|
if TransportType.HTTP in transports:
|
||||||
logging.info(f"Registering HTTP Endpoint: ({request_types}) {http_path}")
|
logging.info(f"Registering HTTP Endpoint: ({request_types}) {http_path}")
|
||||||
|
|
Loading…
Reference in New Issue