Remote Modules: How to report errors to panel?

ishc

Registered
Nov 20, 2013
1
0
1
cPanel Access Level
Website Owner
Hello!

I am writing a remote module for cPanel,
using this documentation:
How to Write dnsadmin Plugin Remote Modules

My module is going to control external name servers,
create and replace zone files, etc.

But i do not understand how to report errors to cPanel's engine.

For example, I tried to `return ($Cpanel::NameServer::Constants::ERROR_GENERIC, $errmsg)`
from removezone() but this had no effect on the panel behavior.

Am I doing anything wrong?
How do I report error that occured in a "remote module"?

How can I change the status icon from green disk to red one?
Why does substring 'Unable to remove' in my module's output has
a magical effect to this icon (changes to a triangle with an exclamation mark)?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,202
363
Hello :)

While this might not answer your question specifically, you can find useful examples in the following directory:

Code:
/usr/local/cpanel/Cpanel/NameServer/Remote
However, if you feel there is a bug with the dnsadmin plugin's remote module, feel free to open a bug report via:

Submit A Bug Report

Thank you.