Web Wook Unknown Error

After activating a webhook for the cases modules i get the following error(see below) every time I tried to create a case from the sugarCRM base platform, it keeps functioning after the record has been created and it sends the event created to the specified endpoint for further processing but keeps throwing the same error...any ideas why this is happening?


How to generate the error:
1: Create a logic Hook ( you can use https://webhook.site/ to test endpoint)
2: Choose POST method .
3: Module Name: cases ( although it fails with any other module)
4: trigger event: After save.
--------After the Web hook has been set up-------------------------
5:create a case FROM THE SUGARCRM cases module, assign to any account/contact (if created from the support portal it won't show any error)
6: The event is sent to the web hook and the case gets created but it shows an error, sometimes Http 500 or unknown error (see image/log).

Has anyone troubleshoot this? is this a configuration issue (even though it's pretty straight forward) ?

Web Hook Error

Parents
  • Hi ,

    Can you scroll down to the end of the page and share the actual SQL error? Yes, this does seem straightforward and works for me, so need more info on what the actual error was - which looks like it's related to the "Insert" query, based on your screenshot.

  • Hey 

    This the bottom....

    Filtering for errors i've found this...but no SQL error

    NOTE: a mail server is trigger when a new case is created for auto-reply, (it looks for a contact in the contacts subpanel and sends an email) but when a case is created from the 'base'/administration platform there is no contact and this could be causing the error...........but i tried to reproduce the error with the workflow (auto-reply email) turned off and the webhook still active and the error still poped up, the only time the error screen doesn't show is when i dont use the web logic hooks functionality.

    The log/code is really really long and only a one liner...but i hope the image helps 

  • Hi ,

    Your screenshot has some useful information. If you see the last line in the first screenshot - It says 

    Got a packet bigger than 'max_allowed_packet' bytes

    What this means is that - the web hook is not able to save current case information in your job table.

    The way web hooks work is that - it dumps the complete record information into the "job_queue" table - which usually is in the order of 8MB. If you have a lot of custom fields and data, the size is even bigger.

    Based on the error message, in your MySQL configuration, the max_allowed_packet setting is probably really low - is it like 8 MB? You can try increasing it to say 32MB or 64MB.

    You should modify your MySQL configuration - usually the file name is my.ini or my.cnf and put this line under [mysqld] section:

    max_allowed_packet=32M

    Once you make this change and restart the MySQL server, the web hook should start working. Please let us know if this works for you.

Reply
  • Hi ,

    Your screenshot has some useful information. If you see the last line in the first screenshot - It says 

    Got a packet bigger than 'max_allowed_packet' bytes

    What this means is that - the web hook is not able to save current case information in your job table.

    The way web hooks work is that - it dumps the complete record information into the "job_queue" table - which usually is in the order of 8MB. If you have a lot of custom fields and data, the size is even bigger.

    Based on the error message, in your MySQL configuration, the max_allowed_packet setting is probably really low - is it like 8 MB? You can try increasing it to say 32MB or 64MB.

    You should modify your MySQL configuration - usually the file name is my.ini or my.cnf and put this line under [mysqld] section:

    max_allowed_packet=32M

    Once you make this change and restart the MySQL server, the web hook should start working. Please let us know if this works for you.

Children