Open bishalatbentley opened 1 month ago
Show code that illustrates your problems.
Suppose I have an IpcHandler like this:
class MyHandler extends IpcHandler implements MyInterface
If I forget to register it, I was expecting it should give some error in the console.
Similarly, for EditCommands, if I use same command ID in two different commands, I was expecting it will give relevant error something like "Duplicate command Id MyCommandId
used"
class MyCommand extends EditCommand implements MyCommandIpc {
public static override commandId = "MyCommandId";
class SomeCommand extends EditCommand implements SomeCommandIpc {
public static override commandId = "MyCommandId";
When, specifically, would you expect to see each of these errors? In the case of the duplicate command, you said "Error is there but not very clear as what to do". What error specifically and when does it occur?
I was using IpcHandler in a studio app. I was calling the backend method (member of IpcHandler) from frontend via ipc which should in turn call the actual backend method. And, it was not calling the backend method and I was clueless what I am missing. So, maybe, at that time, it should tell that MyIpcHandler is not registered and I should register it first. Other option could be showing the error when the app starts but I'm not sure if that's possible and even a good idea.
The error was something like caller.whateverMethodIWasTryingToCall is not a function
. One command was taking precedence over the other, and the backend endpoints weren't being hit. As this error was experienced by one of my team members but I think the error comes when we call the methods from FE which are part of commands.
Thanks. Your best chance for getting a fix for this in the near term is to submit a PR.
Is your feature request related to a problem? Please describe. We didn't get any errors or warnings in the console in the below two cases:
Error/warning in the console could immediately tell the developer what to do to fix the problem. And sometimes it might take a lot of time to figure out the issue for someone new.
Describe the solution you'd like Logging errors in the console for the two cases:
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Additional context Add any other context or screenshots about the feature request here.