Skip to content
DataMiner DoJo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Blog
  • Questions
  • Learning
    • E-learning Courses
    • Open Classroom Training
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • Tutorials
    • Video Library
    • Books We Like
    • >> Go to DataMiner Docs
  • Expert Center
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Markets & Industries
      • Media production
      • Government & defense
      • Content distribution
      • Service providers
      • Partners
      • OSS/BSS
    • DataMiner Insights
      • Security
      • Integration Studio
      • System Architecture
      • DataMiner Releases & Updates
      • DataMiner Apps
    • Agile
      • Agile Webspace
      • Everything Agile
        • The Agile Manifesto
        • Best Practices
        • Retro Recipes
      • Methodologies
        • The Scrum Framework
        • Kanban
        • Extreme Programming
      • Roles
        • The Product Owner
        • The Agile Coach
        • The Quality & UX Coach (QX)
    • DataMiner DevOps Professional Program
  • Downloads
  • More
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
      • General Inquiries
      • DataMiner DevOps Support
      • Commercial Requests
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

Help Defining HTTP API Error Handling in My First Driver

302 views5th March 2025Connector error handling HTTP
1
Deema Mahmud32 4th March 2025 0 Comments

Hello Everyone,

I am currently developing my first driver, and I need some help with handling errors in my HTTP-based protocol. The API documentation defines an error response schema with only two parameters:

  • code (integer, optional)
  • message (string, optional)

However, there is no specific description of what these error codes or messages represent. Additionally, the default error response is labeled as "Invalid request" without further details.

My Questions:

  1. How should I define this error structure in my protocol?

    • What parameters do I need to capture from the API response?
    • How should I structure error logging and handling?
  2. How should I implement this in my protocol (from parameter to trigger to QAction)?

    • What’s the best way to handle this in a QAction or a trigger?
    • Should I create a dedicated error-handling QAction?

Any guidance on how to structure this properly would be greatly appreciated. Thanks in advance!

Felix Wesemeier [DevOps Catalyst] Answered question 5th March 2025

2 Answers

  • Active
  • Voted
  • Newest
  • Oldest
0
Felix Wesemeier [DevOps Catalyst]1.81K Posted 5th March 2025 0 Comments

Hi Deema,

there is a video which look usefull for your case: Use case: CoinMarketCap API Integration - DataMiner Dojo

  • What parameters do I need to capture from the API response?
    • You need at least one param for the response and another one for the Response Status Code
  • How should I structure error logging and handling?
    • This depends on how you response data is structured a what do you need out of it
  • What’s the best way to handle this in a QAction or a trigger?
    • When you receive the response this can trigger a QAction, inside the QAction you Get the parameters where Status Code and Response are stored into variables
    • Then you could work like if (statuscode != 200) to handle error response separately from normal responses
    • If you have e.g. JSON data in your response you could desiralize it with Newtonsoft.Json
    • Then you could store parts of the response you need in parameters of your choice
      • you could store it into a code and a message param, also could split the message into multiple params
      • yoiu could store it in a table to store every errored request (dont forget a cleaning mechanism to not have a endless growing table)
    • dont forget to clean status code and response parameters after response, as the QAction will not triggered again if you have exactly the same response+status code, e.g.:
      • protocol.CheckTrigger(123); in your response (123 is an example which id yur trigger has
      • trigger id 123 type action and content is the id of the action
      • action 123 with <On id="59;60" (your parameter ids to clear)>parameter</On><Type>clear</Type>
  • Should I create a dedicated error-handling QAction?
    • You should work at least with try/catch blocks to write QAction errors in the element log file, the rest depends on your needs
Felix Wesemeier [DevOps Catalyst] Answered question 5th March 2025
You are viewing 1 out of 2 answers, click here to view all answers.
Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas

Recent questions

Alarm Dashboard PDF/CSV Export 0 Answers | 0 Votes
Is the Microsoft SharePoint Connector Still Usable 0 Answers | 0 Votes
Is the Microsoft SharePoint Connector Still Usable 0 Answers | 0 Votes

Question Tags

adl2099 (115) alarm (62) Alarm Console (82) alarms (100) alarm template (83) Automation (223) automation scipt (111) Automation script (167) backup (71) Cassandra (180) Connector (108) Correlation (68) Cube (150) Dashboard (194) Dashboards (188) database (83) DataMiner Cube (57) DIS (81) DMS (71) DOM (139) driver (65) DVE (55) Elastic (83) Elasticsearch (115) elements (80) Failover (104) GQI (159) HTTP (76) IDP (74) LCA (151) low code app (166) low code apps (93) lowcodeapps (75) MySQL (53) protocol (203) QAction (83) security (88) services (51) SNMP (86) SRM (337) table (54) trending (87) upgrade (62) Visio (539) Visual Overview (345)
Privacy Policy • Terms & Conditions • Contact

© 2025 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs

[ Placeholder content for popup link ] WordPress Download Manager - Best Download Management Plugin