Hello everyone,
We're introducing a powerful addition to Deluge that gives you more precise control over error handling in your scripts.
Whether you're calling an external API, validating user input, or enforcing a business rule, there are moments when a script needs to stop and flag that something went wrong. Take API calls as an example: a script using invokeUrl gets marked as successful the moment the call is made, not when it actually succeeds. That means an API returning a 400, a rejected payload, or a silently failed transaction can all leave the script looking green while the business process behind it breaks.
Handling this today involves a lot of workarounds. It works, but it's tedious. That's why we're introducing the throw statement in Deluge.
What throw does
throw lets you explicitly raise a custom exception the moment something goes wrong, whether it's an API returning an error, a business rule being violated, or a validation check failing. The script stops right there and passes control to the nearest matching catch block.
throw and catch, working together
throw is designed to work hand-in-hand with catch. Think of it as a two-part flow:
- throw raises the exception with the details you define.
- catch picks up the exception and decides what to do with it, whether retrying, notifying someone, or handling it gracefully.
If no catch block is available to handle a thrown exception, the script terminates with the exception details, so a failure never gets silently swallowed.
A quick example
Here's a simple use of throw. If the order quantity is zero or negative, the script raises an exception and the catch block handles it:
try
{
if(orderQuantity <= 0)
{
throw "Invalid order quantity";
}
info "Order accepted.";
}
catch(e)
{
info "Order failed: " + e;
info "Line number: " + e.lineNo;
}
Now, let's consider a business scenario. Say you have a Deluge function that pushes a new invoice to an external accounting service:
invoicePayload = Map();
invoicePayload.put("invoice_id", "INV-1042");
invoicePayload.put("amount", 2500);
invoicePayload.put("currency", "USD");
try
{
response = invokeUrl
[
url : "
https://api.example.com/invoices" type : POST
parameters : invoicePayload
];
if(response.get("status") != "success")
{
throw {
"message" : "Invoice sync failed",
"data" : response
};
}
info "Invoice synced successfully.";
}
catch(e)
{
info "Sync failed: " + e.message;
info "API response: " + e.data;
info "Line number: " + e.lineNo;
}
Here, we've explicitly told throw to attach the API response as part of the exception. When the accounting service rejects the invoice, the script stops, and the calling catch block receives the full response for inspection (exactly the context needed to log, retry, or alert).
What else throw unlocks
A few things worth knowing once you start using throw:
Rich exception details
Along with a message, you can attach data of any Deluge type. This is what makes exceptions useful downstream. Some examples of what to pass:
- The API response, for API-related failures
- The record ID and current field values, for validation errors
- The user input that triggered the issue, for form-level checks
- Any custom object that helps the catch block understand what went wrong
Re-throwing exceptions
Sometimes one catch block isn't enough. Re-throwing lets you handle an exception at more than one level. You can nest try-catch blocks inside each other. An inner catch can do its own work with the exception, then pass the same exception up to an outer catch by throwing it again.
Sample code:
try
{
try
{
// sync logic here
}
catch(e)
{
info "Sync failed: " + e.message; // local logging
throw e; // re-throw to outer catch
}
}
catch(e)
{
// outer handler: notify the user, roll back, alert admin, etc.
}
The inner catch records the failure, and the outer catch handles the response like notifying or rolling back, without either duplicating the other's logic.
Exception propagation
If a function raises an exception without handling it, Deluge moves the exception up to the script that called the function, giving that script the chance to catch it. This is what makes reusable validation functions possible: you can write validation logic once, throw inside it freely, and let the calling script decide how to respond.
Documentation
We believe the throw statement will be a great value addition to your Deluge scripts. Give it a try and let us know what you think.
If you have any questions or need assistance, feel free to reach out; we're always happy to help.
Regards,
The Zoho Creator Team
Recent Topics
CRM Address Field - States with Countries in brackets
Hi, Could you please remove the country in brackets from the Global State List, or at least allow us to edit these entries? It looks like the brackets were added during the initial data population, perhaps by someone building the list in a spreadsheet
👍 Zoho CRM's Notes now gets Reactions and a new look
Available in SA and JP DCs. Rolling out to other DCs in phases. Hello everyone, Notes help users capture important updates, collaborate with teammates, and maintain context for records. Now with Note Reactions, users can quickly acknowledge updates, express
Meet PageHealth by Zoho PageSense: a free way to find out what's holding your page back
We all know the feeling. You've spent days tweaking headlines, moving buttons, and rewriting copy, and you're still not sure why visitors aren't sticking around. Revamping your website is hard, and figuring out what's actually getting in the way is even
How can I show an uploaded image larger/full size in a Zoho Forms response PDF?
Hi, I noticed that in a response PDF for Forms, the uploaded image is shown in a tiny box as seen in my screenshot. Is there any way I can make that appear larger in the response PDF? thanks.
Convert MSG to PDF in Bulk with Attachment Free
Microsoft Outlook saves each email as an MSG file, keeping with it key information like the sender, the recipient, the subject, the date, the body of the message, and any attachments. It can, however, be quite difficult to access a large number of MSG
Zoho Tables is now part of Zoho One!
Hey everyone! We've got some exciting news to share. Zoho Tables is now included in your Zoho One subscription at no extra cost. If you're already on Zoho One, head to your app list, add Zoho Tables, and get started right away. You don't need a separate
Button or Links order
Is there a way to re-order the buttons or links that are created? Moderation Update: With our recent enhancement to custom button creation from the layout editor, administrators can now reorder custom buttons directly from the layout editor, and this
How to mass find and delete duplicate files from OneDrive
It is easy to save documents, photos, videos, and all other types of files using Onedrive, but if you upload the same files more than once then your OneDrive storage can end up being filled with a large number of duplicate files. Manually searching out
Make Your Workflows Smarter with Zia Agents
Hello, Enterprise Support Community, Workflow rules can now go beyond predefined actions. Zia Agents can now be invoked directly from workflow rules in Zoho CRM, allowing you to bring contextual, AI powered actions into your automated processes. Choose
How can I add a Custom Field (or Customer_name) to a picklist?
Our workflow is Shopify-->SO -->Picklist-->Package-->Shipment. We would like to have the Picklist template to include a custom field "Customer_Notes" (we have created this field already). This way we get alerted when a customer has notes on their account.
DYK 14: Create Tasks with AI
Did you know AI can suggest tasks within your Zoho Projects portal? Breaking a project into clear, actionable work items takes time and manual effort. Especially when the same team handles both planning and execution. AI task suggestions in Zoho Projects
Widget Height were destroyed
All widget heights in the Details Canvas view are broken.
Task Module quick create settings
Hello, requesting the Task module receive a quick create customization settings. We have added custom fields and have to select "More fields" at the bottom of the pop-up to access the custom fields.
#11 Nithya's First Overseas Client
Nithya designs for clients in three countries and has never met any of them. Her first overseas invoice took a full evening. The second took four minutes. The difference was not a clever tax trick. She stopped treating every international customer as
Other languages in Schedulers (Zoho Books)
Hello everyone, currently we have create functions in other languages, like nodejs etc but on schedulers we can use only deluge.. Are other languages on schedulers roll out? Kind regards, Sakis Oikonomou
New in Office Integrator: Extract data from images into your spreadsheet
Hi users, We are pleased to introduce the Data from Picture feature in Zoho Office Integrator's spreadsheet editor. It intelligently detects and organizes text and numbers from any image into structured cells using OCR. With this feature, users can turn
Edit PDFs using Zoho PDF Editor
Hello users, In a previous article, we covered the organizing capabilities of Zoho PDF Editor. Here, we'll provide a quick recap of its editing features, including a few new additions. A few highlights of Zoho PDF Editor's editing capabilities: Add and
Lookups and Custom Modules
I created a Custom Module that I'm calling "Item Purchasing Group". This module will store information for groups of Items that must be purchased together (including minimum overall quantities and/or values, etc.). This will have a one-to-many relationship
Partner with HDFC And Sbi Bank.
Hdfc and sbi both are very popular bank if zoho books become partner with this banks then many of the zoho books users will benefit premium features of partnered banks.
Solution to Import OST File into Office 365.
In today’s digital workplace, organizations are rapidly moving toward cloud-based email systems for better flexibility, security, and collaboration. Microsoft 365 has become one of the most widely used platforms for business communication. A common requirement
Mail Merge templates in Sandbox
Rolled out for all DCs Hello everyone, You can now create and test Mail Merge templates directly in Sandbox, making it easier to validate document generation without affecting your live organization. Why this matters Mail Merge templates are often used
Convert MBOX to PST File Using Free Methods
MBOX is a mailbox format that is used by various email clients and services, such as Thunderbird, Apple Mail, Eudora, and Google Takeout. Yet, in order to be able to open your MBOX emails in Microsoft Outlook, you have to convert them from MBOX to PST
Zoho Books | Product updates | October 2026
Hello users, October brings a range of new features and enhancements to Zoho Books, designed to simplify compliance, streamline accounting workflows, and improve inventory management. From the launch of the Nigeria Edition and France’s e-invoicing capabilities
Dashboard Table of “My New Work Orders” Changes View
Hi FSM Team, We noticed an inconsistency with the Dashboard Table of “My New Work Orders.” Initially, the table is configured to use the “My New Work Orders” view. When we go to the Home page, the table displays a different set of records. When we return
Tips & Tricks #6 | Zoho Vault: Audita actividad, Gestiona accesos, Comparte credenciales & mucho más.
¿Sabías que Zoho Vault puede hacer mucho más por la seguridad de tu equipo? Las contraseñas forman parte del día a día de cualquier persona y organización. Aplicaciones, herramientas internas, cuentas de clientes, servicios externos, plataformas de marketing,
Inquiry Regarding Customer Hierarchy & Sub-Customer Creation via Zoho API
Dear Zoho Support Team, Our mutual client has requested support for implementing the Customer Hierarchy (Parent/Sub-Customer structure) within our existing workflow. At the moment, all invoices are being created in Zoho under the main (parent) customer
Which Zoho CRM tasks would you want an AI assistant to handle?
I’ve started delegating my Zoho CRM work to AI – and many tasks now take me half the time. It has been so useful that we’re now working to make it available to everyone. Instead of clicking through records and tabs, I simply describe what needs to be
Introducing MCP for Zoho CommunitySpaces
Hello everyone, Your AI assistant can now share the community workload with you. Zoho CommunitySpaces supports MCP (Model Context Protocol), so you can link an AI assistant like Claude, ChatGPT, or Cursor to your community and run it through plain language
CV-Library: The Newest Source Booster in Zoho Recruit!
We’ve expanded your sourcing toolkit — CV-Library, one of the UK’s largest and most trusted online job boards, is now available as a Source Booster in Zoho Recruit. This gives recruiters instant access to millions of UK-based candidate profiles, all without
Tip 52#: Ways to improve data flexibility using related list
A related list offers an ideal solution to string related data across entities together. It enables you to pull records from any module or external source and float them as a tab within your project, sprint, epic, work item, or release detail view layout.
Email Blast
Hi, How do we send an email blast to thousands of customers? The email addresses are not yet saved in Zoho Desk.
Zoho ERP | Product updates | September 2026
Hello users, A new month, a fresh set of updates in Zoho ERP. This month brings Netting, enhancements across our verticals, and more updates to help streamline your everyday work. Explore this month’s updates and see what’s new. Introducing Netting If
Introducing Zoho POS for Restaurants
Hello Community, We’re thrilled to announce the launch of Zoho POS for Restaurants, unveiled at the 30th milestone edition of Zoholics India 2026. Running a restaurant involves multiple teams and workflows. A single table journey, from seating a guest
WhatsApp Business Message Pricing Update: Effective October 1, 2026
Hi everyone, Starting October 1, 2026, Meta is updating how WhatsApp Business messages are charged. This guide explains the new per-message pricing model, how message categories work, and what changes for service messages specifically. How Meta charges
Zoho Calendar integration for Bigin
Hello everyone, We're excited to introduce Zoho Calendar's integration in Bigin! For a while now, users have been able to sync events in Bigin with Google Calendar and Outlook Calendar - but with this new topping, it syncs with Zoho Calendar as well.
Does Updating Employee Names and Profile Pictures in Zoho One Automatically Sync Across All Zoho Applications?
Hi Zoho Team, We are currently using Zoho One in our organization and want to centrally manage employee profile information. As a Zoho One Super Admin, if I update the employee name and profile picture for all users from the Zoho One Admin Panel, will
Enhanced shared mailboxes: Dedicated Sent folders, Run-through filters & fresh UI
Hi everyone, Collaborative communication is the backbone of smooth operations; whether you are handling customer support queries, managing vendor requests, or tracking sales leads. Shared mailboxes in Zoho Mail ensure your team stays on the same page
How to Manage Two GST Numbers / Two Companies in a Single Zoho Inventory Organization?
Hi Team, We currently have two separate legal entities: A Proprietorship Firm with its own GSTIN A Private Limited Company with a different GSTIN However, operationally, both companies deal with the same products, and we would like to manage the physical
10/22 15時〜 オンラインもくもく会のお知らせ | Zoho ワークアウト
ユーザーの皆さま、こんにちは。コミュニティグループの中野です。 10月22日(木)開催の「Zoho ワークアウト」をご案内します。 Zoho ワークアウトは、参加者それぞれが取り組みたいテーマを持ち寄り、ユーザー同士で交流しながら、 設定・検証・運用改善を進めるオンラインの「もくもく会」です。 「試してみたい設定があるけれど、なかなか時間を取れない」 「一人で進めていると、途中で手が止まってしまう」 「他のユーザーの活用方法や工夫を聞いてみたい」 そんな方は、Zoho ワークアウトで一緒に取り組んでみませんか?
Reporting tags associated to Project in Zoho books?
Hi, I know you can add reporting tags to contact, articles and transactions. Is it possible to add reporting tags to Project. We Zoho reports I would be able to generate reports by tags. Sometimes tags for a contact is different for projects (ie Projects
Next Page