SlideShare ist ein Scribd-Unternehmen logo
1 von 35
Downloaden Sie, um offline zu lesen
Error Handling With MuleSoft
Engineering Student MuleSoft Meetup Group
June 18, 2022
11:00 IST (GMT+05:30)
Safe Harbour Statement
● Both the speaker and the host are organizing this meet-up in individual capacity only. We are
not representing our companies here.
● This presentation is strictly for learning purposes only. Organizer/Presenter do not hold any
responsibility that same solution will work for your business requirements.
● This presentation is not meant for any promotional activities.
2
A recording of this meetup will be uploaded to events page within 24 hours.
Questions can be submitted/asked at any time in the Chat/Questions & AnswersTab.
Make it more Interactive!!!
Give us feedback! Rate this meetup session by filling feedback form at the end of theday.
We Love Feedbacks!!! Its Bread & Butter for Meetup.
Housekeeping
3
Online Engineering Student Group: Meetup
4
Organizer(s)
5
Ankita Mishra
●11+ years of Experience in Training, Testing and Customer
Support .
●Working as Manager-Technical Training at Apisero Inc
●MuleSoft Certified Developer and Platform Architect.
Speaker
Agenda
● Errors and its types
● Handling Errors at different levels
- Application
- Flow
- Processor
● Error Handling Scopes
- On Error Propagate
- On Error Continue
● Error Mapping
● Wrap Up - Q&A
Errors and its Types
(with Demonstration)
❖ An 'error' is a deviation from accuracy or correctness.
❖ Error Handling is a process to detect each error, report it to the user, and then make some
recovery strategy to handle the error.
❖ There are 2 types of errors:
➔ System Errors
➔ Messaging Errors
8
What is an Error?
9
System Errors
● System Errors:
➢ Thrown at the system level and involve no event.
➢ Occur during application start-up or when a connection to an external system fails.
➢ Non-configurable, but logs the error and for connections, executes any
reconnection strategy
10
Messaging Errors
● Messaging Errors:
➢ Thrown when a problem occurs within a flow and involves a mule event.
➢ Normal flow execution stops and the event is passed to an error handler (if one is
defined)
➢ By default, unhandled errors are
logged and propagated
➢ Subflows cannot have their
own error handlers
11
More about Errors
❖ When an error is thrown, an error object is created
❖ Two of its properties include
➢ error.description – a string
➢ error.errorType – an object
● Error types are identified by a namespace and an identifier – HTTP:UNAUTHORIZED,
HTTP:CONNECTIVITY, MULE: EXPRESSION
12
More about Errors
Each error type has a parent
❖ HTTP:UNAUTHORIZED has MULE:CLIENT_SECURITY as the parent, which has
MULE:SECURITY as the parent
❖ The error type ANY is the most general parent
13
HTTP Listeners - Response
● By default, for a success response
❖ The payload
❖ A status code of 200
● By default, for an error response
❖ The error description
❖ A status code of 500
● We can override these values for an HTTP Listener as per the requirement
Handling Errors at different levels
(With Demonstration)
15
Levels of Handling Errors
Error handlers can be added to
● An application (outside of any flows)
● A flow
● A selection of one or more event processors
16
Handling Errors at Application Level
● We need to add the error handler outside a flow
● It is recommended to put the error handler in the global configuration file
● Specify this handler to be the application’s default error handler
17
Handling Errors at Flow Level
● If a flow has an error handler
❖ The error is handled by the first error scope whose condition evaluates to true.
❖ If no scope conditions are true, the error is handled by the Mule default error handler
❖ NOT any scope in an application’s global default handler
● If a flow does not have an error handler
❖ The error is handled by a scope in an application’s default error handler.
❖ Else it is handled by the Mule default error handler
18
Handling Errors at Processor Level
❖ For more fine grain error handling of
elements within a flow, we use the Try scope
❖ Any number of processors can be added
to a Try scope
❖ The Try scope has its own error handling section
to which one or or more error scopes can be added
Error Handling Scopes
(with Demonstration)
20
On Error Propagate
❖ The rest of the flow that threw the error is not executed any further.
❖ Control goes to the error handler where all processors in the error handling scope
are executed
❖ At the end of the scope
➢ The error is thrown up to the next level and handled there
➢ An HTTP Listener returns an error response
21
On Error Continue
❖ The rest of the flow that threw the error is not executed any further.
❖ Control goes to the error handler where all processors in the error handling scope
are executed
❖ At the end of the scope
➢ The event is passed up to the next level as if the flow execution had
completed successfully
➢ An HTTP Listener returns the success response
Error Mapping
(with Demonstration)
23
Error Mapping
● Mule 4 now also allows for mapping default errors to custom ones
● Mapping enables us to customize error handling by routing errors to the
appropriate error handler
● In each operation of the flow, we can map the possible error types to a
custom error type as per the requirement.
● These custom error types help us to differentiate where an error occurred in
the flow otherwise it would be difficult to identify the source of the error in the
Mule application logs
● It is advised to define namespaces related to the particular Mule app name or
context and do NOT use existing connector namespace
24
Error Mapping
Q & A
Take a stand !
18
●Nominate yourself for the next meetup speaker and suggest a topic as well.
20
● Share:
○ Tweet using the hashtag #MuleSoftMeetups
○ Invite your network to join: https://meetups.mulesoft.com/engineering-student-
group/
● Feedback:
○ Fill out the survey feedback and suggest topics for upcoming events
○ Contact MuleSoft at meetups@mulesoft.com for ways to improve the program
What’s next?
Quiz Time
Get ready to WIN a Special Gift from MuleSoft Community
29
● In case of On error Continue, what should be default response of http listener?
a) Status Code: 200, body: error.description
b) Status Code: 500, body: error.description
c) Status Code: 200, body: payload
d) Status Code: 500, body: payload
Q1
30
● In case of On error Continue, what should be default response of http listener?
a) Status Code: 200, body: error.description
b) Status Code: 500, body: error.description
c) Status Code: 200, body: payload
d) Status Code: 500, body: payload
Q1
31
● SubFlows can have error handler scopes at flow level?
a) True
b) False
Q2
32
● SubFlows can have error handler scopes at flow level?
a) True
b) False
Q2
33
● Validation error comes under which parent?
a) Critical
b) General
c) Any
d) Connectivity
Q3
34
● Validation error comes under which parent?
a) Critical
b) General
c) Any
d) Connectivity
Q3
Thank you

Weitere ähnliche Inhalte

Ähnlich wie Engineering Student MuleSoft Meetup#5 - Error Handling With MuleSoft

Virtual MuleSoft Meetup may_2020
Virtual MuleSoft Meetup may_2020Virtual MuleSoft Meetup may_2020
Virtual MuleSoft Meetup may_2020Om Prakash
 
MuleSoft Surat Meetup#47 - Error Handling With MuleSoft
MuleSoft Surat Meetup#47 - Error Handling With MuleSoftMuleSoft Surat Meetup#47 - Error Handling With MuleSoft
MuleSoft Surat Meetup#47 - Error Handling With MuleSoftJitendra Bafna
 
Coimbatore meetup error handling 24apr2021
Coimbatore meetup error handling 24apr2021Coimbatore meetup error handling 24apr2021
Coimbatore meetup error handling 24apr2021Anoop Ramachandran
 
Mule meetup Hyderabad
Mule meetup HyderabadMule meetup Hyderabad
Mule meetup HyderabadSravan Lingam
 
MuleSoft Kochi Meetup #5– Handling Mule Exceptions
MuleSoft Kochi Meetup #5– Handling Mule ExceptionsMuleSoft Kochi Meetup #5– Handling Mule Exceptions
MuleSoft Kochi Meetup #5– Handling Mule Exceptionssumitahuja94
 
MuleSoft Meetup | Reading Meetup Group | Hosted by Integral Zone
MuleSoft Meetup | Reading Meetup Group | Hosted by Integral ZoneMuleSoft Meetup | Reading Meetup Group | Hosted by Integral Zone
MuleSoft Meetup | Reading Meetup Group | Hosted by Integral ZoneIntegralZone
 
Vancouver mulesoft meetup_23-july
Vancouver mulesoft meetup_23-julyVancouver mulesoft meetup_23-july
Vancouver mulesoft meetup_23-julyVikalp Bhalia
 
Mulesoft meetup slides mumbai_20113019_exception_handling
Mulesoft meetup slides mumbai_20113019_exception_handlingMulesoft meetup slides mumbai_20113019_exception_handling
Mulesoft meetup slides mumbai_20113019_exception_handlingManish Kumar Yadav
 
Delhi MuleSoft Meetup - 19 march2022
Delhi MuleSoft Meetup - 19 march2022Delhi MuleSoft Meetup - 19 march2022
Delhi MuleSoft Meetup - 19 march2022AnuragSharma900
 
MuleSoft Surat Meetup#46 - Deep Dive into MUnit With MuleSoft
MuleSoft Surat Meetup#46 - Deep Dive into MUnit With MuleSoftMuleSoft Surat Meetup#46 - Deep Dive into MUnit With MuleSoft
MuleSoft Surat Meetup#46 - Deep Dive into MUnit With MuleSoftJitendra Bafna
 
MuleSoft Composer | Patna MuleSoft Meetup #14
MuleSoft Composer | Patna MuleSoft Meetup #14MuleSoft Composer | Patna MuleSoft Meetup #14
MuleSoft Composer | Patna MuleSoft Meetup #14shyamraj55
 
VISUAL_BASIC_LECTURE_NOTE_A_Z_MADE_EASY.pdf
VISUAL_BASIC_LECTURE_NOTE_A_Z_MADE_EASY.pdfVISUAL_BASIC_LECTURE_NOTE_A_Z_MADE_EASY.pdf
VISUAL_BASIC_LECTURE_NOTE_A_Z_MADE_EASY.pdfNALANDACSCCENTRE
 
MuleSoft Surat Virtual Meetup#31 - Async API, Process Error, Circuit Breaker ...
MuleSoft Surat Virtual Meetup#31 - Async API, Process Error, Circuit Breaker ...MuleSoft Surat Virtual Meetup#31 - Async API, Process Error, Circuit Breaker ...
MuleSoft Surat Virtual Meetup#31 - Async API, Process Error, Circuit Breaker ...Jitendra Bafna
 
#9 Calicut MuleSoft Meetup - Munits in Mule 4.pptx
#9 Calicut MuleSoft Meetup - Munits in Mule 4.pptx#9 Calicut MuleSoft Meetup - Munits in Mule 4.pptx
#9 Calicut MuleSoft Meetup - Munits in Mule 4.pptxAnoopRamachandran13
 
#9 Calicut MuleSoft Meetup - Munits in Mule 4.pptx
#9 Calicut MuleSoft Meetup - Munits in Mule 4.pptx#9 Calicut MuleSoft Meetup - Munits in Mule 4.pptx
#9 Calicut MuleSoft Meetup - Munits in Mule 4.pptxJohnMathewPhilip
 
Indianapolis_meetup_April-1st-2022.pptx
Indianapolis_meetup_April-1st-2022.pptxIndianapolis_meetup_April-1st-2022.pptx
Indianapolis_meetup_April-1st-2022.pptxikram_ahamed
 
27th Hyderabad MuleSoft Meetup
27th Hyderabad MuleSoft Meetup27th Hyderabad MuleSoft Meetup
27th Hyderabad MuleSoft MeetupMuleSoft Meetups
 
#2 connected apps_calicut_31_july
#2 connected apps_calicut_31_july#2 connected apps_calicut_31_july
#2 connected apps_calicut_31_julyJohnMathewPhilip
 

Ähnlich wie Engineering Student MuleSoft Meetup#5 - Error Handling With MuleSoft (20)

Virtual MuleSoft Meetup may_2020
Virtual MuleSoft Meetup may_2020Virtual MuleSoft Meetup may_2020
Virtual MuleSoft Meetup may_2020
 
MuleSoft Surat Meetup#47 - Error Handling With MuleSoft
MuleSoft Surat Meetup#47 - Error Handling With MuleSoftMuleSoft Surat Meetup#47 - Error Handling With MuleSoft
MuleSoft Surat Meetup#47 - Error Handling With MuleSoft
 
Online Spanish meetup #1
Online Spanish meetup #1Online Spanish meetup #1
Online Spanish meetup #1
 
Coimbatore meetup error handling 24apr2021
Coimbatore meetup error handling 24apr2021Coimbatore meetup error handling 24apr2021
Coimbatore meetup error handling 24apr2021
 
Mule meetup Hyderabad
Mule meetup HyderabadMule meetup Hyderabad
Mule meetup Hyderabad
 
MuleSoft Kochi Meetup #5– Handling Mule Exceptions
MuleSoft Kochi Meetup #5– Handling Mule ExceptionsMuleSoft Kochi Meetup #5– Handling Mule Exceptions
MuleSoft Kochi Meetup #5– Handling Mule Exceptions
 
MuleSoft Meetup | Reading Meetup Group | Hosted by Integral Zone
MuleSoft Meetup | Reading Meetup Group | Hosted by Integral ZoneMuleSoft Meetup | Reading Meetup Group | Hosted by Integral Zone
MuleSoft Meetup | Reading Meetup Group | Hosted by Integral Zone
 
Vancouver mulesoft meetup_23-july
Vancouver mulesoft meetup_23-julyVancouver mulesoft meetup_23-july
Vancouver mulesoft meetup_23-july
 
Mulesoft meetup slides mumbai_20113019_exception_handling
Mulesoft meetup slides mumbai_20113019_exception_handlingMulesoft meetup slides mumbai_20113019_exception_handling
Mulesoft meetup slides mumbai_20113019_exception_handling
 
Delhi MuleSoft Meetup - 19 march2022
Delhi MuleSoft Meetup - 19 march2022Delhi MuleSoft Meetup - 19 march2022
Delhi MuleSoft Meetup - 19 march2022
 
MuleSoft Surat Meetup#46 - Deep Dive into MUnit With MuleSoft
MuleSoft Surat Meetup#46 - Deep Dive into MUnit With MuleSoftMuleSoft Surat Meetup#46 - Deep Dive into MUnit With MuleSoft
MuleSoft Surat Meetup#46 - Deep Dive into MUnit With MuleSoft
 
MuleSoft Composer | Patna MuleSoft Meetup #14
MuleSoft Composer | Patna MuleSoft Meetup #14MuleSoft Composer | Patna MuleSoft Meetup #14
MuleSoft Composer | Patna MuleSoft Meetup #14
 
VISUAL_BASIC_LECTURE_NOTE_A_Z_MADE_EASY.pdf
VISUAL_BASIC_LECTURE_NOTE_A_Z_MADE_EASY.pdfVISUAL_BASIC_LECTURE_NOTE_A_Z_MADE_EASY.pdf
VISUAL_BASIC_LECTURE_NOTE_A_Z_MADE_EASY.pdf
 
MuleSoft Surat Virtual Meetup#31 - Async API, Process Error, Circuit Breaker ...
MuleSoft Surat Virtual Meetup#31 - Async API, Process Error, Circuit Breaker ...MuleSoft Surat Virtual Meetup#31 - Async API, Process Error, Circuit Breaker ...
MuleSoft Surat Virtual Meetup#31 - Async API, Process Error, Circuit Breaker ...
 
#9 Calicut MuleSoft Meetup - Munits in Mule 4.pptx
#9 Calicut MuleSoft Meetup - Munits in Mule 4.pptx#9 Calicut MuleSoft Meetup - Munits in Mule 4.pptx
#9 Calicut MuleSoft Meetup - Munits in Mule 4.pptx
 
#9 Calicut MuleSoft Meetup - Munits in Mule 4.pptx
#9 Calicut MuleSoft Meetup - Munits in Mule 4.pptx#9 Calicut MuleSoft Meetup - Munits in Mule 4.pptx
#9 Calicut MuleSoft Meetup - Munits in Mule 4.pptx
 
Indianapolis_meetup_April-1st-2022.pptx
Indianapolis_meetup_April-1st-2022.pptxIndianapolis_meetup_April-1st-2022.pptx
Indianapolis_meetup_April-1st-2022.pptx
 
27th Hyderabad MuleSoft Meetup
27th Hyderabad MuleSoft Meetup27th Hyderabad MuleSoft Meetup
27th Hyderabad MuleSoft Meetup
 
API LifeCycle Management
API LifeCycle ManagementAPI LifeCycle Management
API LifeCycle Management
 
#2 connected apps_calicut_31_july
#2 connected apps_calicut_31_july#2 connected apps_calicut_31_july
#2 connected apps_calicut_31_july
 

Mehr von Jitendra Bafna

MuleSoft Surat Meetup#55 - Unleash the power of Anypoint MQ
MuleSoft Surat Meetup#55 - Unleash the power of Anypoint MQMuleSoft Surat Meetup#55 - Unleash the power of Anypoint MQ
MuleSoft Surat Meetup#55 - Unleash the power of Anypoint MQJitendra Bafna
 
MuleSoft Surat Meetup#54 - MuleSoft Automation
MuleSoft Surat Meetup#54 - MuleSoft AutomationMuleSoft Surat Meetup#54 - MuleSoft Automation
MuleSoft Surat Meetup#54 - MuleSoft AutomationJitendra Bafna
 
MuleSoft Surat Meetup#53 - MuleSoft for Clinical Trial Modernization
MuleSoft Surat Meetup#53 - MuleSoft for Clinical Trial ModernizationMuleSoft Surat Meetup#53 - MuleSoft for Clinical Trial Modernization
MuleSoft Surat Meetup#53 - MuleSoft for Clinical Trial ModernizationJitendra Bafna
 
MuleSoft Surat Meetup#52 - Flex Gateway (Port Based Routing V/S Path Based Ro...
MuleSoft Surat Meetup#52 - Flex Gateway (Port Based Routing V/S Path Based Ro...MuleSoft Surat Meetup#52 - Flex Gateway (Port Based Routing V/S Path Based Ro...
MuleSoft Surat Meetup#52 - Flex Gateway (Port Based Routing V/S Path Based Ro...Jitendra Bafna
 
MuleSoft Surat Meetup#51 - API Monitoring - Through a New Lens
MuleSoft Surat Meetup#51 - API Monitoring - Through a New LensMuleSoft Surat Meetup#51 - API Monitoring - Through a New Lens
MuleSoft Surat Meetup#51 - API Monitoring - Through a New LensJitendra Bafna
 
Engineering Student MuleSoft Meetup#7 - Leveraging MuleSoft Service in Salesf...
Engineering Student MuleSoft Meetup#7 - Leveraging MuleSoft Service in Salesf...Engineering Student MuleSoft Meetup#7 - Leveraging MuleSoft Service in Salesf...
Engineering Student MuleSoft Meetup#7 - Leveraging MuleSoft Service in Salesf...Jitendra Bafna
 
MuleSoft Nashik Meetup#7 - Building FHIR applications in MongoDB using MuleSoft
MuleSoft Nashik Meetup#7 - Building FHIR applications in MongoDB using MuleSoftMuleSoft Nashik Meetup#7 - Building FHIR applications in MongoDB using MuleSoft
MuleSoft Nashik Meetup#7 - Building FHIR applications in MongoDB using MuleSoftJitendra Bafna
 
MuleSoft Surat Meetup#50 - Ask the MuleSoft Ambassadors + CloudHub 2.0 Overvi...
MuleSoft Surat Meetup#50 - Ask the MuleSoft Ambassadors + CloudHub 2.0 Overvi...MuleSoft Surat Meetup#50 - Ask the MuleSoft Ambassadors + CloudHub 2.0 Overvi...
MuleSoft Surat Meetup#50 - Ask the MuleSoft Ambassadors + CloudHub 2.0 Overvi...Jitendra Bafna
 
MuleSoft Surat Meetup#49 - Robotic Process Automation - Why, Where, When and ...
MuleSoft Surat Meetup#49 - Robotic Process Automation - Why, Where, When and ...MuleSoft Surat Meetup#49 - Robotic Process Automation - Why, Where, When and ...
MuleSoft Surat Meetup#49 - Robotic Process Automation - Why, Where, When and ...Jitendra Bafna
 
MuleSoft Surat Meetup#48 - Anypoint API Governance (RAML, OAS and Async API) ...
MuleSoft Surat Meetup#48 - Anypoint API Governance (RAML, OAS and Async API) ...MuleSoft Surat Meetup#48 - Anypoint API Governance (RAML, OAS and Async API) ...
MuleSoft Surat Meetup#48 - Anypoint API Governance (RAML, OAS and Async API) ...Jitendra Bafna
 
MuleSoft Surat Meetup#45 - Anypoint Flex Gateway as a Kubernetes Ingress Cont...
MuleSoft Surat Meetup#45 - Anypoint Flex Gateway as a Kubernetes Ingress Cont...MuleSoft Surat Meetup#45 - Anypoint Flex Gateway as a Kubernetes Ingress Cont...
MuleSoft Surat Meetup#45 - Anypoint Flex Gateway as a Kubernetes Ingress Cont...Jitendra Bafna
 
MuleSoft Surat Meetup#44 - Anypoint Flex Gateway Custom Policies With Rust
MuleSoft Surat Meetup#44 - Anypoint Flex Gateway Custom Policies With RustMuleSoft Surat Meetup#44 - Anypoint Flex Gateway Custom Policies With Rust
MuleSoft Surat Meetup#44 - Anypoint Flex Gateway Custom Policies With RustJitendra Bafna
 
Engineering Student MuleSoft Meetup#6 - Basic Understanding of DataWeave With...
Engineering Student MuleSoft Meetup#6 - Basic Understanding of DataWeave With...Engineering Student MuleSoft Meetup#6 - Basic Understanding of DataWeave With...
Engineering Student MuleSoft Meetup#6 - Basic Understanding of DataWeave With...Jitendra Bafna
 
MuleSoft Nashik Meetup#5 - JSON Logger and Externalize Logs
MuleSoft Nashik Meetup#5 - JSON Logger and Externalize LogsMuleSoft Nashik Meetup#5 - JSON Logger and Externalize Logs
MuleSoft Nashik Meetup#5 - JSON Logger and Externalize LogsJitendra Bafna
 
MuleSoft Surat Meetup#43 - Combine Service Mesh With Anypoint API Management ...
MuleSoft Surat Meetup#43 - Combine Service Mesh With Anypoint API Management ...MuleSoft Surat Meetup#43 - Combine Service Mesh With Anypoint API Management ...
MuleSoft Surat Meetup#43 - Combine Service Mesh With Anypoint API Management ...Jitendra Bafna
 
MuleSoft Surat Meetup#42 - Runtime Fabric Manager on Self Managed Kubernetes ...
MuleSoft Surat Meetup#42 - Runtime Fabric Manager on Self Managed Kubernetes ...MuleSoft Surat Meetup#42 - Runtime Fabric Manager on Self Managed Kubernetes ...
MuleSoft Surat Meetup#42 - Runtime Fabric Manager on Self Managed Kubernetes ...Jitendra Bafna
 
MuleSoft Surat Meetup#41 - Universal API Management, Anypoint Flex Gateway an...
MuleSoft Surat Meetup#41 - Universal API Management, Anypoint Flex Gateway an...MuleSoft Surat Meetup#41 - Universal API Management, Anypoint Flex Gateway an...
MuleSoft Surat Meetup#41 - Universal API Management, Anypoint Flex Gateway an...Jitendra Bafna
 
MuleSoft Surat Meetup#40 - Watermarking Concept and Fragments in MuleSoft
MuleSoft Surat Meetup#40 - Watermarking Concept and Fragments in MuleSoftMuleSoft Surat Meetup#40 - Watermarking Concept and Fragments in MuleSoft
MuleSoft Surat Meetup#40 - Watermarking Concept and Fragments in MuleSoftJitendra Bafna
 
Engineering Student MuleSoft Meetup#4 - API Testing With MuleSoft
Engineering Student MuleSoft Meetup#4 - API Testing With MuleSoftEngineering Student MuleSoft Meetup#4 - API Testing With MuleSoft
Engineering Student MuleSoft Meetup#4 - API Testing With MuleSoftJitendra Bafna
 
MuleSoft Surat Meetup#39 - Pragmatic API Led Connectivity
MuleSoft Surat Meetup#39 - Pragmatic API Led ConnectivityMuleSoft Surat Meetup#39 - Pragmatic API Led Connectivity
MuleSoft Surat Meetup#39 - Pragmatic API Led ConnectivityJitendra Bafna
 

Mehr von Jitendra Bafna (20)

MuleSoft Surat Meetup#55 - Unleash the power of Anypoint MQ
MuleSoft Surat Meetup#55 - Unleash the power of Anypoint MQMuleSoft Surat Meetup#55 - Unleash the power of Anypoint MQ
MuleSoft Surat Meetup#55 - Unleash the power of Anypoint MQ
 
MuleSoft Surat Meetup#54 - MuleSoft Automation
MuleSoft Surat Meetup#54 - MuleSoft AutomationMuleSoft Surat Meetup#54 - MuleSoft Automation
MuleSoft Surat Meetup#54 - MuleSoft Automation
 
MuleSoft Surat Meetup#53 - MuleSoft for Clinical Trial Modernization
MuleSoft Surat Meetup#53 - MuleSoft for Clinical Trial ModernizationMuleSoft Surat Meetup#53 - MuleSoft for Clinical Trial Modernization
MuleSoft Surat Meetup#53 - MuleSoft for Clinical Trial Modernization
 
MuleSoft Surat Meetup#52 - Flex Gateway (Port Based Routing V/S Path Based Ro...
MuleSoft Surat Meetup#52 - Flex Gateway (Port Based Routing V/S Path Based Ro...MuleSoft Surat Meetup#52 - Flex Gateway (Port Based Routing V/S Path Based Ro...
MuleSoft Surat Meetup#52 - Flex Gateway (Port Based Routing V/S Path Based Ro...
 
MuleSoft Surat Meetup#51 - API Monitoring - Through a New Lens
MuleSoft Surat Meetup#51 - API Monitoring - Through a New LensMuleSoft Surat Meetup#51 - API Monitoring - Through a New Lens
MuleSoft Surat Meetup#51 - API Monitoring - Through a New Lens
 
Engineering Student MuleSoft Meetup#7 - Leveraging MuleSoft Service in Salesf...
Engineering Student MuleSoft Meetup#7 - Leveraging MuleSoft Service in Salesf...Engineering Student MuleSoft Meetup#7 - Leveraging MuleSoft Service in Salesf...
Engineering Student MuleSoft Meetup#7 - Leveraging MuleSoft Service in Salesf...
 
MuleSoft Nashik Meetup#7 - Building FHIR applications in MongoDB using MuleSoft
MuleSoft Nashik Meetup#7 - Building FHIR applications in MongoDB using MuleSoftMuleSoft Nashik Meetup#7 - Building FHIR applications in MongoDB using MuleSoft
MuleSoft Nashik Meetup#7 - Building FHIR applications in MongoDB using MuleSoft
 
MuleSoft Surat Meetup#50 - Ask the MuleSoft Ambassadors + CloudHub 2.0 Overvi...
MuleSoft Surat Meetup#50 - Ask the MuleSoft Ambassadors + CloudHub 2.0 Overvi...MuleSoft Surat Meetup#50 - Ask the MuleSoft Ambassadors + CloudHub 2.0 Overvi...
MuleSoft Surat Meetup#50 - Ask the MuleSoft Ambassadors + CloudHub 2.0 Overvi...
 
MuleSoft Surat Meetup#49 - Robotic Process Automation - Why, Where, When and ...
MuleSoft Surat Meetup#49 - Robotic Process Automation - Why, Where, When and ...MuleSoft Surat Meetup#49 - Robotic Process Automation - Why, Where, When and ...
MuleSoft Surat Meetup#49 - Robotic Process Automation - Why, Where, When and ...
 
MuleSoft Surat Meetup#48 - Anypoint API Governance (RAML, OAS and Async API) ...
MuleSoft Surat Meetup#48 - Anypoint API Governance (RAML, OAS and Async API) ...MuleSoft Surat Meetup#48 - Anypoint API Governance (RAML, OAS and Async API) ...
MuleSoft Surat Meetup#48 - Anypoint API Governance (RAML, OAS and Async API) ...
 
MuleSoft Surat Meetup#45 - Anypoint Flex Gateway as a Kubernetes Ingress Cont...
MuleSoft Surat Meetup#45 - Anypoint Flex Gateway as a Kubernetes Ingress Cont...MuleSoft Surat Meetup#45 - Anypoint Flex Gateway as a Kubernetes Ingress Cont...
MuleSoft Surat Meetup#45 - Anypoint Flex Gateway as a Kubernetes Ingress Cont...
 
MuleSoft Surat Meetup#44 - Anypoint Flex Gateway Custom Policies With Rust
MuleSoft Surat Meetup#44 - Anypoint Flex Gateway Custom Policies With RustMuleSoft Surat Meetup#44 - Anypoint Flex Gateway Custom Policies With Rust
MuleSoft Surat Meetup#44 - Anypoint Flex Gateway Custom Policies With Rust
 
Engineering Student MuleSoft Meetup#6 - Basic Understanding of DataWeave With...
Engineering Student MuleSoft Meetup#6 - Basic Understanding of DataWeave With...Engineering Student MuleSoft Meetup#6 - Basic Understanding of DataWeave With...
Engineering Student MuleSoft Meetup#6 - Basic Understanding of DataWeave With...
 
MuleSoft Nashik Meetup#5 - JSON Logger and Externalize Logs
MuleSoft Nashik Meetup#5 - JSON Logger and Externalize LogsMuleSoft Nashik Meetup#5 - JSON Logger and Externalize Logs
MuleSoft Nashik Meetup#5 - JSON Logger and Externalize Logs
 
MuleSoft Surat Meetup#43 - Combine Service Mesh With Anypoint API Management ...
MuleSoft Surat Meetup#43 - Combine Service Mesh With Anypoint API Management ...MuleSoft Surat Meetup#43 - Combine Service Mesh With Anypoint API Management ...
MuleSoft Surat Meetup#43 - Combine Service Mesh With Anypoint API Management ...
 
MuleSoft Surat Meetup#42 - Runtime Fabric Manager on Self Managed Kubernetes ...
MuleSoft Surat Meetup#42 - Runtime Fabric Manager on Self Managed Kubernetes ...MuleSoft Surat Meetup#42 - Runtime Fabric Manager on Self Managed Kubernetes ...
MuleSoft Surat Meetup#42 - Runtime Fabric Manager on Self Managed Kubernetes ...
 
MuleSoft Surat Meetup#41 - Universal API Management, Anypoint Flex Gateway an...
MuleSoft Surat Meetup#41 - Universal API Management, Anypoint Flex Gateway an...MuleSoft Surat Meetup#41 - Universal API Management, Anypoint Flex Gateway an...
MuleSoft Surat Meetup#41 - Universal API Management, Anypoint Flex Gateway an...
 
MuleSoft Surat Meetup#40 - Watermarking Concept and Fragments in MuleSoft
MuleSoft Surat Meetup#40 - Watermarking Concept and Fragments in MuleSoftMuleSoft Surat Meetup#40 - Watermarking Concept and Fragments in MuleSoft
MuleSoft Surat Meetup#40 - Watermarking Concept and Fragments in MuleSoft
 
Engineering Student MuleSoft Meetup#4 - API Testing With MuleSoft
Engineering Student MuleSoft Meetup#4 - API Testing With MuleSoftEngineering Student MuleSoft Meetup#4 - API Testing With MuleSoft
Engineering Student MuleSoft Meetup#4 - API Testing With MuleSoft
 
MuleSoft Surat Meetup#39 - Pragmatic API Led Connectivity
MuleSoft Surat Meetup#39 - Pragmatic API Led ConnectivityMuleSoft Surat Meetup#39 - Pragmatic API Led Connectivity
MuleSoft Surat Meetup#39 - Pragmatic API Led Connectivity
 

Kürzlich hochgeladen

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 

Kürzlich hochgeladen (20)

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 

Engineering Student MuleSoft Meetup#5 - Error Handling With MuleSoft

  • 1. Error Handling With MuleSoft Engineering Student MuleSoft Meetup Group June 18, 2022 11:00 IST (GMT+05:30)
  • 2. Safe Harbour Statement ● Both the speaker and the host are organizing this meet-up in individual capacity only. We are not representing our companies here. ● This presentation is strictly for learning purposes only. Organizer/Presenter do not hold any responsibility that same solution will work for your business requirements. ● This presentation is not meant for any promotional activities. 2
  • 3. A recording of this meetup will be uploaded to events page within 24 hours. Questions can be submitted/asked at any time in the Chat/Questions & AnswersTab. Make it more Interactive!!! Give us feedback! Rate this meetup session by filling feedback form at the end of theday. We Love Feedbacks!!! Its Bread & Butter for Meetup. Housekeeping 3
  • 4. Online Engineering Student Group: Meetup 4 Organizer(s)
  • 5. 5 Ankita Mishra ●11+ years of Experience in Training, Testing and Customer Support . ●Working as Manager-Technical Training at Apisero Inc ●MuleSoft Certified Developer and Platform Architect. Speaker
  • 6. Agenda ● Errors and its types ● Handling Errors at different levels - Application - Flow - Processor ● Error Handling Scopes - On Error Propagate - On Error Continue ● Error Mapping ● Wrap Up - Q&A
  • 7. Errors and its Types (with Demonstration)
  • 8. ❖ An 'error' is a deviation from accuracy or correctness. ❖ Error Handling is a process to detect each error, report it to the user, and then make some recovery strategy to handle the error. ❖ There are 2 types of errors: ➔ System Errors ➔ Messaging Errors 8 What is an Error?
  • 9. 9 System Errors ● System Errors: ➢ Thrown at the system level and involve no event. ➢ Occur during application start-up or when a connection to an external system fails. ➢ Non-configurable, but logs the error and for connections, executes any reconnection strategy
  • 10. 10 Messaging Errors ● Messaging Errors: ➢ Thrown when a problem occurs within a flow and involves a mule event. ➢ Normal flow execution stops and the event is passed to an error handler (if one is defined) ➢ By default, unhandled errors are logged and propagated ➢ Subflows cannot have their own error handlers
  • 11. 11 More about Errors ❖ When an error is thrown, an error object is created ❖ Two of its properties include ➢ error.description – a string ➢ error.errorType – an object ● Error types are identified by a namespace and an identifier – HTTP:UNAUTHORIZED, HTTP:CONNECTIVITY, MULE: EXPRESSION
  • 12. 12 More about Errors Each error type has a parent ❖ HTTP:UNAUTHORIZED has MULE:CLIENT_SECURITY as the parent, which has MULE:SECURITY as the parent ❖ The error type ANY is the most general parent
  • 13. 13 HTTP Listeners - Response ● By default, for a success response ❖ The payload ❖ A status code of 200 ● By default, for an error response ❖ The error description ❖ A status code of 500 ● We can override these values for an HTTP Listener as per the requirement
  • 14. Handling Errors at different levels (With Demonstration)
  • 15. 15 Levels of Handling Errors Error handlers can be added to ● An application (outside of any flows) ● A flow ● A selection of one or more event processors
  • 16. 16 Handling Errors at Application Level ● We need to add the error handler outside a flow ● It is recommended to put the error handler in the global configuration file ● Specify this handler to be the application’s default error handler
  • 17. 17 Handling Errors at Flow Level ● If a flow has an error handler ❖ The error is handled by the first error scope whose condition evaluates to true. ❖ If no scope conditions are true, the error is handled by the Mule default error handler ❖ NOT any scope in an application’s global default handler ● If a flow does not have an error handler ❖ The error is handled by a scope in an application’s default error handler. ❖ Else it is handled by the Mule default error handler
  • 18. 18 Handling Errors at Processor Level ❖ For more fine grain error handling of elements within a flow, we use the Try scope ❖ Any number of processors can be added to a Try scope ❖ The Try scope has its own error handling section to which one or or more error scopes can be added
  • 19. Error Handling Scopes (with Demonstration)
  • 20. 20 On Error Propagate ❖ The rest of the flow that threw the error is not executed any further. ❖ Control goes to the error handler where all processors in the error handling scope are executed ❖ At the end of the scope ➢ The error is thrown up to the next level and handled there ➢ An HTTP Listener returns an error response
  • 21. 21 On Error Continue ❖ The rest of the flow that threw the error is not executed any further. ❖ Control goes to the error handler where all processors in the error handling scope are executed ❖ At the end of the scope ➢ The event is passed up to the next level as if the flow execution had completed successfully ➢ An HTTP Listener returns the success response
  • 23. 23 Error Mapping ● Mule 4 now also allows for mapping default errors to custom ones ● Mapping enables us to customize error handling by routing errors to the appropriate error handler ● In each operation of the flow, we can map the possible error types to a custom error type as per the requirement. ● These custom error types help us to differentiate where an error occurred in the flow otherwise it would be difficult to identify the source of the error in the Mule application logs ● It is advised to define namespaces related to the particular Mule app name or context and do NOT use existing connector namespace
  • 25. Q & A
  • 26. Take a stand ! 18 ●Nominate yourself for the next meetup speaker and suggest a topic as well.
  • 27. 20 ● Share: ○ Tweet using the hashtag #MuleSoftMeetups ○ Invite your network to join: https://meetups.mulesoft.com/engineering-student- group/ ● Feedback: ○ Fill out the survey feedback and suggest topics for upcoming events ○ Contact MuleSoft at meetups@mulesoft.com for ways to improve the program What’s next?
  • 28. Quiz Time Get ready to WIN a Special Gift from MuleSoft Community
  • 29. 29 ● In case of On error Continue, what should be default response of http listener? a) Status Code: 200, body: error.description b) Status Code: 500, body: error.description c) Status Code: 200, body: payload d) Status Code: 500, body: payload Q1
  • 30. 30 ● In case of On error Continue, what should be default response of http listener? a) Status Code: 200, body: error.description b) Status Code: 500, body: error.description c) Status Code: 200, body: payload d) Status Code: 500, body: payload Q1
  • 31. 31 ● SubFlows can have error handler scopes at flow level? a) True b) False Q2
  • 32. 32 ● SubFlows can have error handler scopes at flow level? a) True b) False Q2
  • 33. 33 ● Validation error comes under which parent? a) Critical b) General c) Any d) Connectivity Q3
  • 34. 34 ● Validation error comes under which parent? a) Critical b) General c) Any d) Connectivity Q3