Getting Started with DeskDirector
DeskDirector Portals
Browser Support
What is the DeskDirector Admin Portal?
What is the DeskDirector Tech Portal
What is the DeskDirector Client Portal?
Desktop Portal
Managing Your Account
Admin Essentials
DeskDirector Features Overview
Logging in to DeskDirector
User Profiles & Profile Pictures
Managing Tickets with DeskDirector
Office Hours
Getting Started with the Solution Library
How Searching Works
Embedding Help Page Media
Get started with the DeskDirector Power Automate Connector
Features
Portal Customization
Forms
Service Catalogue
Communication
Email Connectors
Notifications
Email Notifications
Actionable Messages for Emails
Real-Time Chats
Email Template Engine
Surveys
Broadcasts
Generative AI
DeskDirector with Generative AI
Ticket Summary for TECH Portal
Setting up AI Service Providers
Microsoft Foundry for DeskDirector
Knowledge Bases for AI Assistants
Custom Tools for AI Assistants
AI Assistants in DeskDirector
Advanced
Login & Authentication
Contact Groups
Custom Domains
File Storage
Dashboard
Accounts
Contacts
Approvals
Tags
Task Lists
The Learning Center
Portal Deep Linking
Auditing & Analytics
Microsoft Power Automate
Actions
Solutions
Featured Solution: Teams Ticket Discussion
Power Automate Template Gallery
Featured Solution: Ticket Briefing
Power Automate Administration
DeskDirector Power Platform Connector Reference
Power Automate Connector - Setting up your first flow
Microsoft Teams App
Introducing the DeskDirector for Microsoft Team App
Installing the Microsoft Teams App (Client Mode)
Installing the Microsoft Teams App (TECH Mode)
Setting up Tags for Teams Discussions (TECH Portal)
Branding the DeskDirector Teams App
DeskDirector Teams App Notifications
Contact Groups Integration with Microsoft Teams
Setting up Content Security Policy (CSP)
Advanced topic: Setting up Tech & Client Mode in the same tenancy
Integrating Microsoft Teams with DeskDirector Tech Portal
Smart Alerts for TECH Users
Integrations
Developer Resources
Getting Started
What is the Toki Iti API
API Versions & Routes
Roles & Scopes
Authorization Options
Querying the API
How to Change an Entity Through the API
API Key Authorization
OAuth Fundamentals
Understanding OAuth for Tokity Integrations: Key Concepts
OAuth Authorization Code Flow: How an App Gets Access to Tokity
OAuth App Registration
How to Register an OAuth App to Integrate with Tokity
Choosing an OAuth App Type: Confidential vs. Public Apps and Client Secrets
OAuth Personal Secrets: What They Are and When to Use Them
OAuth Administration
Configuring OAuth Settings in Tokity
Managing OAuth Authorized Sessions and User Consent
Granting OAuth Admin Consent at the Root Level
API Response Control
Uploading Attachments (Ticket API)
The Prefer Header — Overview
Controlling Returned Data (Ticket API)
Controlling Returned Data (Form Result API)
Controlling Returned Data (Workspace API)
Workspace Ordering
How Workspace Ordering Works
Creating and Reordering Workspace Groups
Adding and Reordering Tickets in a Workspace Group
Data Sync & Notifications
Delta API: Tracking Changes Over Time
Webhooks vs. Events — Differences, When to Use Which
Verifying Webhook and Event Payloads (HMAC Signature)
Ticket Widgets
Ticket Widget: Overview
How the Widget Is Requested
Ticket Widget Anatomy and Styling
Ticket Widget Actions: Leading, Secondary and Primary
Ticket Widget: Progress Type
Ticket Widget: List Type
Ticket Widget: Description Type
Ticket Widget: Form Type
Ticket Widget: Control When a Widget Refreshes
Ticket Widget: Form Results and State Across Steps
Ticket Widget: Error Responses and Debugging
Ticket Widget: Building a Multi-Step Request
Glossary
Security
Troubleshooting
Troubleshooting via Web Developer Tools
Permissions & Access - Common Issues
Contact DeskDirector Support
Troubleshooting DeskDirector Connection Issues
Desktop Portal - Common Issues
Contact Impersonation
Approvals - Common Issues
Microsoft Teams App - Common Issues
Email & Email Delivery - Common Issues
Login & Authentication - Common Issues
DeskDirector Desktop App - Installation Issues
Table of Contents
- All Categories
- Developer Resources
- Ticket Widgets
- Ticket Widget: Error Responses and Debugging
Ticket Widget: Error Responses and Debugging
Updated
by Helpdocs Admin
When something goes wrong, the widget shows an error instead of its content. This article explains what counts as an error, how to return one that displays well, and how to find the cause of a problem.
In short: return an error in the standard shape, with a clear message. The user sees the message. The code is for developers and is visible only in the browser's network panel.
What counts as an error
A widget shows an error in these cases:
- Your API returns a status code of 400 or higher.
- The response doesn't follow the widget specification. The client builds this error itself, because it can't render what it received.
- The request fails, for example because of a network failure.
Returning an error
Follow this shape so the error displays correctly:
{
"error": {
"code": "asset_not_found",
"message": "We couldn't find that asset. It may have been removed."
}
}Send it with a status code of 400 or higher, for example 404 or 500.
messageis shown to the user in the widget. Write it for the person reading the ticket: short, plain, and say what to do next if you can. Don't include technical details, ids or stack traces.codeis not shown in the UI. Use a stable, searchable value such asasset_not_found. It can be seen in the network panel, so it helps when someone reports a problem.
Use an error for failures only. For expected results, such as an empty list, return a normal response.
If your API returns an error that is not in this shape, or a network failure happens, the client treats it as if no error message was given. The user sees the error layout without your message.
How the error looks
The widget switches to an error layout:
- Icon: the error icon.
- Header: a message saying the widget had difficulty displaying.
- Content: your error
message.
You can't change the icon. It isn't part of the error response, so only code and message can be set.
The user can press the refresh button to try again.
When the response breaks the specification
The client checks the structure of a successful response. If the structure is wrong, it shows an error even though the status code was fine.
A structure failure is when a property is missing or has the wrong type. For example:
- A property that must be a string is a number, an object or null.
- A required property, such as
typeortitle, is missing. typeis missing or isn't one ofdescription,list,progressorform.valuedoesn't match the type. For example, a list widget whosevalueisn't a list.
The client builds the error message in this case. Your API doesn't control it.
What is not an error
Limits are not structure failures. If a value is too long, such as a label, the client truncates it and carries on. Extra items beyond a limit are dropped. The widget still displays. See each article for the limits.
Debugging
The most useful thing to do first is save the network record. It holds the request, the response, the status code and the error code.
- Open the browser's developer tools and go to the Network panel.
- Reload the ticket, or press the action that failed.
- Find the request to your widget or action URL.
- Save it, for example with "Save all as HAR" or by copying the request and response.
Then check:
- Status code. 400 or higher means your API returned an error. Read the
codeandmessagein the response. - Status 200 but an error shown. The response probably breaks the structure. Compare it with the type's article. Look for a wrong type, a missing
typeortitle, or avalueof the wrong shape. - Request body. Check
stateandform, and the URL, including its query. See How the Widget Is Requested. - Wrong content after an action. Check the action's URL. The provider tells actions apart by route or query, see Actions.
- Authentication errors. Check that the delegate token is still valid.
When you ask someone for help, attach the saved network record.