SlideShare a Scribd company logo
June 12 , 2021
Dubai – MuleSoft Meetup Group
Error Handling in MuleSoft
2
● Introductions
● Error Handling
● Retry
● Reprocessing
● Log Management
● Wrap-up
Agenda
3
●About the organizer & Speaker:
Introductions
A SHOW OF HANDS:
Who is new to this Meetup?
Error Handling in MuleSoft
5
●An exception occurs when an unexpected event
happens while processing.
●Exception handling is the process of responding to
exceptions when a computer program runs.
●In Mule we can handle the message exception at
different level
Error Handling
Error Handling
● At Project level using Default error handler
● At Project level using Custom Global error handler
● At Flow level in exception handling using :
On Error Continue
On Error Propagate
Raise Error
● With in Flow or at processor level using try scope
6
Error Handling
● Whenever there is an error occurred in a Flow, an error Object is created
● It contains many properties . Eg : error.description , error.errorType etc
● Mule identifies based on error Type and then route to respective blocks that
are placed in Error Handler.
● errorType is combination of Namespace and Identifier :
Eg : HTTP:UNAUTHORIZED
● Here :
namespace = HTTP
Identifier = UNAUTHORIZED
7
Error Handling
● Sub-Flow doesn’t have Error Handling scope
● So, its just Flow and a Private flow where you can place On-Error-Propagate
and On-Error-Continue inside Error-handling block.
● Either it is Propagate or Continue, Mule Executes all the components within
that block
● The error will route to error-handling only if it identifies that the errorType of
that error is handled
● Mule 4 has one excellent feature of Identifying the types of errors that can
occur within that flow by looking at what kind of connectors are placed in that
flow.
8
Error Handling
9
Error Handling
● See if anything is present in Error-Handling
● Even if there are on-errorpropagate and on-error-continue blocks, see that if
that errorType is handled
● If NOT, then Mule will use default Error Handling
● If your flow is not called by any other flow , then it will display default value
that is set in Error-Response and gives status code as 500 bad default if
nothing is set manually
10
11
Error Handling
● There’s something handled in Error-Handler. But errorType is not Matching
with Handled errorType. So don’t care whether it’s error- continue or error-
propagate. When errorType not matched, it will use default error handler by
mule.
Actual errorType = HTTP:CONNECTIVITY
Handled errorType = HTTP:BAD-REQUEST
● It uses Mule’s default error-handling.
● It will print the payload whatever is coming from input just before Http Request
with status code 500
12
13
Error Handling
● There’s something handled in Error-Handler. And errorType is Matching with
Handled errorType.
Actual errorType = HTTP:CONNECTIVITY
Handled errorType = HTTP:CONNECTIVITY
● The flow is using On-Error-Continue . It executes all components in this block.
In this block we are setting payload message with value “Error Handled in
Main flow”.
● it will execute processors in Error-Continue and end the process with 200
status
14
Error Handling
● If some Error Handling is present in that flow and errorType is handled
● Check whether it is On-Error-continue or On- ErrorPropagate
● In both the cases, Mule will execute all components within that block.
● If the error is handled using On-Error Propagate , it will raise an error back to
the calling flow.
● If the error is handled using On-Error Continue , it will not raise an error back
to the calling flow and continue to next processor after “flow-ref” and continues
further process as it is. But it will not continue to other processors in the flow
where error is handled.
● Suppose you have only single flow. Then On-error-propagate and On-error-
Continue behaves same way, instead On-error-continues gives 200 status
and on-error-propagate gives 500 status.
15
Error Handling
● A Raise error is a core component generates a mule error ,as if a failure had
occurred, which allows you to customize its description and type.
● Use this component to only Raise :
Core run time errors, such as MULE:SECURITY, MULE:CONNECTIVITY,
etc.
Custom error types Eg : ORDER:INVALID
● You can not use a connectors existing namespace.
For Raise Error : HTTP:ITEM_NOT_FOUND (wrong)
ITEM:NOT_FOUND (correct)
16
Retry
● Re-connection strategy which we can define on the connectors but that only
retries in case of failure in connection.
● To achieve this, retry mechanism we can use Until Successful
● The until successful scope is one of the scopes available in Mule which
processes messages through its processors until the process succeeds.
● After passing a message into the until successful scope, the main flow
immediately regains control of the thread.
● By default, the Until Successful scope runs asynchronously, but you can
always configure it as synchronous.
17
Retry
● maxRetries: Specifies the maximum number of retries that are attempted.
● millisBetweenRetries: Specifies the minimum interval between two attempts
to process, in milliseconds. The actual interval depends on the previous
execution but should not exceed twice this number. The default value is 60000
milliseconds (one minute).
18
19
Reprocessing
● MuleSoft allows you to process messages as a batch which can be achieved
by batch scope.
● Batch scope in a mule application can divide the input payload into individual
records, performs actions on these individual records, and then sends the
processed data to target systems.
● Within an application, you can initiate a Batch Job scope, which splits
messages into individual records, performs actions upon each record, and
then reports on the results and potentially pushes the processed output to
other systems or queues.
20
21
Log Management
● Logging is useful for monitoring and troubleshooting your Mule
applications and the Mule server whether that's recording errors raised by
the application or specific details, such as status notifications, custom
metadata, and payloads.
● Loggers can be configured to determine what specific packages are to be
logged and to what depth where packages are a grouped set of classes and
interfaces, represented by a namespace.
● Appenders essentially describe how to deliver the logging events to a
destination. Think about where you typically see log events outputted from
your Mule applications the Console view in Anypoint Studio and the log files of
the application itself both are examples of Appenders
22
The default log4j2.xml file
23
Logger Configuration
24
Fields:
Message, Level, Category
● Message :
Specifies the Mule log message.
By default, messages are logged to the application’s log file.
● Level :
Specifies the log level.
Available options are DEBUG , ERROR , INFO(Default) , TRACE , WARN
● Category :
Optional setting that specifies a category name that it adds to log4j2.xml
file. For example, you might use a category to route your log messages
based on your category, or you might set log levels based on category.
25
26
● Share:
○ Tweet using the hashtag #MuleSoftMeetups
○ Invite your network to join: https://meetups.mulesoft.com/dubai/
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?
Introduce yourself to your neighbor
Networking time
Thank you

More Related Content

What's hot

MuleSoft Meetup Adelaide 7th April 2021
MuleSoft Meetup Adelaide 7th April 2021MuleSoft Meetup Adelaide 7th April 2021
MuleSoft Meetup Adelaide 7th April 2021
Nicholas Bowman
 
Sustainability Challenge, Postman, Rest sheet and Anypoint provider : MuleSof...
Sustainability Challenge, Postman, Rest sheet and Anypoint provider : MuleSof...Sustainability Challenge, Postman, Rest sheet and Anypoint provider : MuleSof...
Sustainability Challenge, Postman, Rest sheet and Anypoint provider : MuleSof...
Angel Alberici
 
Mule soft meetup_-_finland_september_25th__2020 v2.0
Mule soft meetup_-_finland_september_25th__2020 v2.0Mule soft meetup_-_finland_september_25th__2020 v2.0
Mule soft meetup_-_finland_september_25th__2020 v2.0
D.Rajesh Kumar
 
Rtf externalize tls MuleSoft meetup
Rtf externalize tls MuleSoft meetupRtf externalize tls MuleSoft meetup
Rtf externalize tls MuleSoft meetup
Sandeep Deshmukh
 
Mule soft meetup_virtual_ 3_charlotte_07july_2021__final
Mule soft meetup_virtual_ 3_charlotte_07july_2021__finalMule soft meetup_virtual_ 3_charlotte_07july_2021__final
Mule soft meetup_virtual_ 3_charlotte_07july_2021__final
Subhash Patel
 
Toronto mule soft meetup november 2021
Toronto mule soft meetup   november 2021Toronto mule soft meetup   november 2021
Toronto mule soft meetup november 2021
Anurag Dwivedi
 
MuleSoft Meetup Bangalore - March 6 2021
MuleSoft Meetup Bangalore - March 6 2021MuleSoft Meetup Bangalore - March 6 2021
MuleSoft Meetup Bangalore - March 6 2021
Nagaraju K R
 
Managing APIs with MuleSoft
Managing APIs with MuleSoftManaging APIs with MuleSoft
Managing APIs with MuleSoft
Guilherme Pereira Silva
 
MuleSoft Meetup Roma - Processi di Automazione su CloudHub
MuleSoft Meetup Roma - Processi di Automazione su CloudHubMuleSoft Meetup Roma - Processi di Automazione su CloudHub
MuleSoft Meetup Roma - Processi di Automazione su CloudHub
Alfonso Martino
 
MuleSoft Meetup - Women Who Mule JAPAC November 2021
MuleSoft Meetup - Women Who Mule JAPAC November 2021MuleSoft Meetup - Women Who Mule JAPAC November 2021
MuleSoft Meetup - Women Who Mule JAPAC November 2021
Archana Patel
 
Metadata definition between flows on Studio 7 : MuleSoft Virtual Muleys Meetups
Metadata definition between flows on Studio 7  : MuleSoft Virtual Muleys MeetupsMetadata definition between flows on Studio 7  : MuleSoft Virtual Muleys Meetups
Metadata definition between flows on Studio 7 : MuleSoft Virtual Muleys Meetups
Angel Alberici
 
mulesoft meetup @ bangalore
mulesoft meetup @ bangaloremulesoft meetup @ bangalore
mulesoft meetup @ bangalore
D.Rajesh Kumar
 
Ready bytes labs products
Ready bytes labs productsReady bytes labs products
Ready bytes labs products
Ready Bytes Software labs
 
Meetup bangalore-may22nd2021
Meetup bangalore-may22nd2021Meetup bangalore-may22nd2021
Meetup bangalore-may22nd2021
pruthviraj krishnam
 
Vancouver mulesoft meetup_23-july
Vancouver mulesoft meetup_23-julyVancouver mulesoft meetup_23-july
Vancouver mulesoft meetup_23-july
Vikalp Bhalia
 
Testing strategies and best practices using MUnit
Testing strategies and best practices using MUnitTesting strategies and best practices using MUnit
Testing strategies and best practices using MUnit
Jimmy Attia
 
Cracow MuleSoft Meetup #1
Cracow MuleSoft Meetup #1Cracow MuleSoft Meetup #1
Cracow MuleSoft Meetup #1
Wojtek Maciejczyk
 
Mule soft meetups-24012020
Mule soft meetups-24012020Mule soft meetups-24012020
Mule soft meetups-24012020
Pablo Bellissimo
 
MuleSoft Meetup #2 in Kyiv, Ukraine - What is special about MuleSoft Catalyst™?
MuleSoft Meetup #2 in Kyiv, Ukraine - What is special about MuleSoft Catalyst™?MuleSoft Meetup #2 in Kyiv, Ukraine - What is special about MuleSoft Catalyst™?
MuleSoft Meetup #2 in Kyiv, Ukraine - What is special about MuleSoft Catalyst™?
Maksym Dovgopolyi, PMP
 
#1 MuleSoft Meetup in Geneva
#1 MuleSoft Meetup in Geneva #1 MuleSoft Meetup in Geneva
#1 MuleSoft Meetup in Geneva
Maksym Dovgopolyi, PMP
 

What's hot (20)

MuleSoft Meetup Adelaide 7th April 2021
MuleSoft Meetup Adelaide 7th April 2021MuleSoft Meetup Adelaide 7th April 2021
MuleSoft Meetup Adelaide 7th April 2021
 
Sustainability Challenge, Postman, Rest sheet and Anypoint provider : MuleSof...
Sustainability Challenge, Postman, Rest sheet and Anypoint provider : MuleSof...Sustainability Challenge, Postman, Rest sheet and Anypoint provider : MuleSof...
Sustainability Challenge, Postman, Rest sheet and Anypoint provider : MuleSof...
 
Mule soft meetup_-_finland_september_25th__2020 v2.0
Mule soft meetup_-_finland_september_25th__2020 v2.0Mule soft meetup_-_finland_september_25th__2020 v2.0
Mule soft meetup_-_finland_september_25th__2020 v2.0
 
Rtf externalize tls MuleSoft meetup
Rtf externalize tls MuleSoft meetupRtf externalize tls MuleSoft meetup
Rtf externalize tls MuleSoft meetup
 
Mule soft meetup_virtual_ 3_charlotte_07july_2021__final
Mule soft meetup_virtual_ 3_charlotte_07july_2021__finalMule soft meetup_virtual_ 3_charlotte_07july_2021__final
Mule soft meetup_virtual_ 3_charlotte_07july_2021__final
 
Toronto mule soft meetup november 2021
Toronto mule soft meetup   november 2021Toronto mule soft meetup   november 2021
Toronto mule soft meetup november 2021
 
MuleSoft Meetup Bangalore - March 6 2021
MuleSoft Meetup Bangalore - March 6 2021MuleSoft Meetup Bangalore - March 6 2021
MuleSoft Meetup Bangalore - March 6 2021
 
Managing APIs with MuleSoft
Managing APIs with MuleSoftManaging APIs with MuleSoft
Managing APIs with MuleSoft
 
MuleSoft Meetup Roma - Processi di Automazione su CloudHub
MuleSoft Meetup Roma - Processi di Automazione su CloudHubMuleSoft Meetup Roma - Processi di Automazione su CloudHub
MuleSoft Meetup Roma - Processi di Automazione su CloudHub
 
MuleSoft Meetup - Women Who Mule JAPAC November 2021
MuleSoft Meetup - Women Who Mule JAPAC November 2021MuleSoft Meetup - Women Who Mule JAPAC November 2021
MuleSoft Meetup - Women Who Mule JAPAC November 2021
 
Metadata definition between flows on Studio 7 : MuleSoft Virtual Muleys Meetups
Metadata definition between flows on Studio 7  : MuleSoft Virtual Muleys MeetupsMetadata definition between flows on Studio 7  : MuleSoft Virtual Muleys Meetups
Metadata definition between flows on Studio 7 : MuleSoft Virtual Muleys Meetups
 
mulesoft meetup @ bangalore
mulesoft meetup @ bangaloremulesoft meetup @ bangalore
mulesoft meetup @ bangalore
 
Ready bytes labs products
Ready bytes labs productsReady bytes labs products
Ready bytes labs products
 
Meetup bangalore-may22nd2021
Meetup bangalore-may22nd2021Meetup bangalore-may22nd2021
Meetup bangalore-may22nd2021
 
Vancouver mulesoft meetup_23-july
Vancouver mulesoft meetup_23-julyVancouver mulesoft meetup_23-july
Vancouver mulesoft meetup_23-july
 
Testing strategies and best practices using MUnit
Testing strategies and best practices using MUnitTesting strategies and best practices using MUnit
Testing strategies and best practices using MUnit
 
Cracow MuleSoft Meetup #1
Cracow MuleSoft Meetup #1Cracow MuleSoft Meetup #1
Cracow MuleSoft Meetup #1
 
Mule soft meetups-24012020
Mule soft meetups-24012020Mule soft meetups-24012020
Mule soft meetups-24012020
 
MuleSoft Meetup #2 in Kyiv, Ukraine - What is special about MuleSoft Catalyst™?
MuleSoft Meetup #2 in Kyiv, Ukraine - What is special about MuleSoft Catalyst™?MuleSoft Meetup #2 in Kyiv, Ukraine - What is special about MuleSoft Catalyst™?
MuleSoft Meetup #2 in Kyiv, Ukraine - What is special about MuleSoft Catalyst™?
 
#1 MuleSoft Meetup in Geneva
#1 MuleSoft Meetup in Geneva #1 MuleSoft Meetup in Geneva
#1 MuleSoft Meetup in Geneva
 

Similar to Mule soft meetup__dubai_12_june- Error Handling

Error Handling In Mule 4 | MuleSoft Mysore Meetup #10
Error Handling In Mule 4 | MuleSoft Mysore Meetup #10Error Handling In Mule 4 | MuleSoft Mysore Meetup #10
Error Handling In Mule 4 | MuleSoft Mysore Meetup #10
MysoreMuleSoftMeetup
 
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
sumitahuja94
 
Indore MuleSoft Meetup #4 : Demystifying Error Handling & Snowflake Integration
Indore MuleSoft Meetup #4 : Demystifying Error Handling & Snowflake IntegrationIndore MuleSoft Meetup #4 : Demystifying Error Handling & Snowflake Integration
Indore MuleSoft Meetup #4 : Demystifying Error Handling & Snowflake Integration
IndoreMulesoftMeetup
 
Online Spanish meetup #1
Online Spanish meetup #1Online Spanish meetup #1
Online Spanish meetup #1
Alexandra N. Martinez
 
Engineering Student MuleSoft Meetup#5 - Error Handling With MuleSoft
Engineering Student MuleSoft Meetup#5 - Error Handling With MuleSoftEngineering Student MuleSoft Meetup#5 - Error Handling With MuleSoft
Engineering Student MuleSoft Meetup#5 - Error Handling With MuleSoft
Jitendra Bafna
 
Coimbatore Second Mule Meetup on Error Handling in Mule 4
Coimbatore Second Mule Meetup on Error Handling in Mule 4Coimbatore Second Mule Meetup on Error Handling in Mule 4
Coimbatore Second Mule Meetup on Error Handling in Mule 4
pqrs1234
 
Ahmadabad mule soft_meetup_11_october_2020_errorhanlingandmonitoringalerts
Ahmadabad mule soft_meetup_11_october_2020_errorhanlingandmonitoringalertsAhmadabad mule soft_meetup_11_october_2020_errorhanlingandmonitoringalerts
Ahmadabad mule soft_meetup_11_october_2020_errorhanlingandmonitoringalerts
Shekh Muenuddeen
 
Ahmadabad mule soft_meetup_11_october_2020_errorhanlingandmonitoringalerts
Ahmadabad mule soft_meetup_11_october_2020_errorhanlingandmonitoringalertsAhmadabad mule soft_meetup_11_october_2020_errorhanlingandmonitoringalerts
Ahmadabad mule soft_meetup_11_october_2020_errorhanlingandmonitoringalerts
Shekh Muenuddeen
 
Error Handling in Mulesoft
Error Handling in MulesoftError Handling in Mulesoft
Error Handling in Mulesoft
Amit Singh
 
Coimbatore meetup error handling 24apr2021
Coimbatore meetup error handling 24apr2021Coimbatore meetup error handling 24apr2021
Coimbatore meetup error handling 24apr2021
Anoop Ramachandran
 
Exception handling in Mule 4 _Virtual mule soft meetup may_2020
Exception handling in Mule 4 �_Virtual mule soft meetup may_2020Exception handling in Mule 4 �_Virtual mule soft meetup may_2020
Exception handling in Mule 4 _Virtual mule soft meetup may_2020
Om Prakash
 
Virtual MuleSoft Meetup may_2020
Virtual MuleSoft Meetup may_2020Virtual MuleSoft Meetup may_2020
Virtual MuleSoft Meetup may_2020
Om Prakash
 
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
Manish Kumar Yadav
 
Mule meetup Hyderabad
Mule meetup HyderabadMule meetup Hyderabad
Mule meetup Hyderabad
Sravan Lingam
 
Mule scopes&error handling
Mule scopes&error handlingMule scopes&error handling
Mule scopes&error handling
Sumit Gole
 
Error handling
Error handlingError handling
Error handling
Meherul1234
 
#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
AnoopRamachandran13
 
#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
JohnMathewPhilip
 
Hyderabad mule meetup_march_2022
Hyderabad mule meetup_march_2022Hyderabad mule meetup_march_2022
Hyderabad mule meetup_march_2022
Sravan Lingam
 
VBscript
VBscriptVBscript
VBscript
vikashraj2090
 

Similar to Mule soft meetup__dubai_12_june- Error Handling (20)

Error Handling In Mule 4 | MuleSoft Mysore Meetup #10
Error Handling In Mule 4 | MuleSoft Mysore Meetup #10Error Handling In Mule 4 | MuleSoft Mysore Meetup #10
Error Handling In Mule 4 | MuleSoft Mysore Meetup #10
 
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
 
Indore MuleSoft Meetup #4 : Demystifying Error Handling & Snowflake Integration
Indore MuleSoft Meetup #4 : Demystifying Error Handling & Snowflake IntegrationIndore MuleSoft Meetup #4 : Demystifying Error Handling & Snowflake Integration
Indore MuleSoft Meetup #4 : Demystifying Error Handling & Snowflake Integration
 
Online Spanish meetup #1
Online Spanish meetup #1Online Spanish meetup #1
Online Spanish meetup #1
 
Engineering Student MuleSoft Meetup#5 - Error Handling With MuleSoft
Engineering Student MuleSoft Meetup#5 - Error Handling With MuleSoftEngineering Student MuleSoft Meetup#5 - Error Handling With MuleSoft
Engineering Student MuleSoft Meetup#5 - Error Handling With MuleSoft
 
Coimbatore Second Mule Meetup on Error Handling in Mule 4
Coimbatore Second Mule Meetup on Error Handling in Mule 4Coimbatore Second Mule Meetup on Error Handling in Mule 4
Coimbatore Second Mule Meetup on Error Handling in Mule 4
 
Ahmadabad mule soft_meetup_11_october_2020_errorhanlingandmonitoringalerts
Ahmadabad mule soft_meetup_11_october_2020_errorhanlingandmonitoringalertsAhmadabad mule soft_meetup_11_october_2020_errorhanlingandmonitoringalerts
Ahmadabad mule soft_meetup_11_october_2020_errorhanlingandmonitoringalerts
 
Ahmadabad mule soft_meetup_11_october_2020_errorhanlingandmonitoringalerts
Ahmadabad mule soft_meetup_11_october_2020_errorhanlingandmonitoringalertsAhmadabad mule soft_meetup_11_october_2020_errorhanlingandmonitoringalerts
Ahmadabad mule soft_meetup_11_october_2020_errorhanlingandmonitoringalerts
 
Error Handling in Mulesoft
Error Handling in MulesoftError Handling in Mulesoft
Error Handling in Mulesoft
 
Coimbatore meetup error handling 24apr2021
Coimbatore meetup error handling 24apr2021Coimbatore meetup error handling 24apr2021
Coimbatore meetup error handling 24apr2021
 
Exception handling in Mule 4 _Virtual mule soft meetup may_2020
Exception handling in Mule 4 �_Virtual mule soft meetup may_2020Exception handling in Mule 4 �_Virtual mule soft meetup may_2020
Exception handling in Mule 4 _Virtual mule soft meetup may_2020
 
Virtual MuleSoft Meetup may_2020
Virtual MuleSoft Meetup may_2020Virtual MuleSoft Meetup may_2020
Virtual MuleSoft Meetup may_2020
 
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
 
Mule meetup Hyderabad
Mule meetup HyderabadMule meetup Hyderabad
Mule meetup Hyderabad
 
Mule scopes&error handling
Mule scopes&error handlingMule scopes&error handling
Mule scopes&error handling
 
Error handling
Error handlingError handling
Error handling
 
#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
 
Hyderabad mule meetup_march_2022
Hyderabad mule meetup_march_2022Hyderabad mule meetup_march_2022
Hyderabad mule meetup_march_2022
 
VBscript
VBscriptVBscript
VBscript
 

More from satyasekhar123

MuleSoft Meetup Dubai Anypoint security with api-led Connectivity
MuleSoft Meetup Dubai  Anypoint security with api-led ConnectivityMuleSoft Meetup Dubai  Anypoint security with api-led Connectivity
MuleSoft Meetup Dubai Anypoint security with api-led Connectivity
satyasekhar123
 
Dubai meetup- Anypoint Runtime Fabric
Dubai meetup- Anypoint Runtime FabricDubai meetup- Anypoint Runtime Fabric
Dubai meetup- Anypoint Runtime Fabric
satyasekhar123
 
Riyadh Meetup4- Sonarqube for Mule 4 Code review
Riyadh Meetup4- Sonarqube for Mule 4 Code reviewRiyadh Meetup4- Sonarqube for Mule 4 Code review
Riyadh Meetup4- Sonarqube for Mule 4 Code review
satyasekhar123
 
Mule soft riyadh virtual meetup_30_aug
Mule soft riyadh virtual meetup_30_augMule soft riyadh virtual meetup_30_aug
Mule soft riyadh virtual meetup_30_aug
satyasekhar123
 
Mule soft riyadh virtual meetup_25_jul
Mule soft riyadh virtual meetup_25_julMule soft riyadh virtual meetup_25_jul
Mule soft riyadh virtual meetup_25_jul
satyasekhar123
 
Hello
HelloHello
Managing_Alfresco_Content_from_within_MS_Office_for_Enterprise.PPTX
Managing_Alfresco_Content_from_within_MS_Office_for_Enterprise.PPTXManaging_Alfresco_Content_from_within_MS_Office_for_Enterprise.PPTX
Managing_Alfresco_Content_from_within_MS_Office_for_Enterprise.PPTX
satyasekhar123
 
WebClient Customization.pdf
WebClient Customization.pdfWebClient Customization.pdf
WebClient Customization.pdf
satyasekhar123
 

More from satyasekhar123 (8)

MuleSoft Meetup Dubai Anypoint security with api-led Connectivity
MuleSoft Meetup Dubai  Anypoint security with api-led ConnectivityMuleSoft Meetup Dubai  Anypoint security with api-led Connectivity
MuleSoft Meetup Dubai Anypoint security with api-led Connectivity
 
Dubai meetup- Anypoint Runtime Fabric
Dubai meetup- Anypoint Runtime FabricDubai meetup- Anypoint Runtime Fabric
Dubai meetup- Anypoint Runtime Fabric
 
Riyadh Meetup4- Sonarqube for Mule 4 Code review
Riyadh Meetup4- Sonarqube for Mule 4 Code reviewRiyadh Meetup4- Sonarqube for Mule 4 Code review
Riyadh Meetup4- Sonarqube for Mule 4 Code review
 
Mule soft riyadh virtual meetup_30_aug
Mule soft riyadh virtual meetup_30_augMule soft riyadh virtual meetup_30_aug
Mule soft riyadh virtual meetup_30_aug
 
Mule soft riyadh virtual meetup_25_jul
Mule soft riyadh virtual meetup_25_julMule soft riyadh virtual meetup_25_jul
Mule soft riyadh virtual meetup_25_jul
 
Hello
HelloHello
Hello
 
Managing_Alfresco_Content_from_within_MS_Office_for_Enterprise.PPTX
Managing_Alfresco_Content_from_within_MS_Office_for_Enterprise.PPTXManaging_Alfresco_Content_from_within_MS_Office_for_Enterprise.PPTX
Managing_Alfresco_Content_from_within_MS_Office_for_Enterprise.PPTX
 
WebClient Customization.pdf
WebClient Customization.pdfWebClient Customization.pdf
WebClient Customization.pdf
 

Recently uploaded

20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
Rohit Gautam
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
TIPNGVN2
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 

Recently uploaded (20)

20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 

Mule soft meetup__dubai_12_june- Error Handling

  • 1. June 12 , 2021 Dubai – MuleSoft Meetup Group Error Handling in MuleSoft
  • 2. 2 ● Introductions ● Error Handling ● Retry ● Reprocessing ● Log Management ● Wrap-up Agenda
  • 3. 3 ●About the organizer & Speaker: Introductions A SHOW OF HANDS: Who is new to this Meetup?
  • 4. Error Handling in MuleSoft
  • 5. 5 ●An exception occurs when an unexpected event happens while processing. ●Exception handling is the process of responding to exceptions when a computer program runs. ●In Mule we can handle the message exception at different level Error Handling
  • 6. Error Handling ● At Project level using Default error handler ● At Project level using Custom Global error handler ● At Flow level in exception handling using : On Error Continue On Error Propagate Raise Error ● With in Flow or at processor level using try scope 6
  • 7. Error Handling ● Whenever there is an error occurred in a Flow, an error Object is created ● It contains many properties . Eg : error.description , error.errorType etc ● Mule identifies based on error Type and then route to respective blocks that are placed in Error Handler. ● errorType is combination of Namespace and Identifier : Eg : HTTP:UNAUTHORIZED ● Here : namespace = HTTP Identifier = UNAUTHORIZED 7
  • 8. Error Handling ● Sub-Flow doesn’t have Error Handling scope ● So, its just Flow and a Private flow where you can place On-Error-Propagate and On-Error-Continue inside Error-handling block. ● Either it is Propagate or Continue, Mule Executes all the components within that block ● The error will route to error-handling only if it identifies that the errorType of that error is handled ● Mule 4 has one excellent feature of Identifying the types of errors that can occur within that flow by looking at what kind of connectors are placed in that flow. 8
  • 10. Error Handling ● See if anything is present in Error-Handling ● Even if there are on-errorpropagate and on-error-continue blocks, see that if that errorType is handled ● If NOT, then Mule will use default Error Handling ● If your flow is not called by any other flow , then it will display default value that is set in Error-Response and gives status code as 500 bad default if nothing is set manually 10
  • 11. 11
  • 12. Error Handling ● There’s something handled in Error-Handler. But errorType is not Matching with Handled errorType. So don’t care whether it’s error- continue or error- propagate. When errorType not matched, it will use default error handler by mule. Actual errorType = HTTP:CONNECTIVITY Handled errorType = HTTP:BAD-REQUEST ● It uses Mule’s default error-handling. ● It will print the payload whatever is coming from input just before Http Request with status code 500 12
  • 13. 13
  • 14. Error Handling ● There’s something handled in Error-Handler. And errorType is Matching with Handled errorType. Actual errorType = HTTP:CONNECTIVITY Handled errorType = HTTP:CONNECTIVITY ● The flow is using On-Error-Continue . It executes all components in this block. In this block we are setting payload message with value “Error Handled in Main flow”. ● it will execute processors in Error-Continue and end the process with 200 status 14
  • 15. Error Handling ● If some Error Handling is present in that flow and errorType is handled ● Check whether it is On-Error-continue or On- ErrorPropagate ● In both the cases, Mule will execute all components within that block. ● If the error is handled using On-Error Propagate , it will raise an error back to the calling flow. ● If the error is handled using On-Error Continue , it will not raise an error back to the calling flow and continue to next processor after “flow-ref” and continues further process as it is. But it will not continue to other processors in the flow where error is handled. ● Suppose you have only single flow. Then On-error-propagate and On-error- Continue behaves same way, instead On-error-continues gives 200 status and on-error-propagate gives 500 status. 15
  • 16. Error Handling ● A Raise error is a core component generates a mule error ,as if a failure had occurred, which allows you to customize its description and type. ● Use this component to only Raise : Core run time errors, such as MULE:SECURITY, MULE:CONNECTIVITY, etc. Custom error types Eg : ORDER:INVALID ● You can not use a connectors existing namespace. For Raise Error : HTTP:ITEM_NOT_FOUND (wrong) ITEM:NOT_FOUND (correct) 16
  • 17. Retry ● Re-connection strategy which we can define on the connectors but that only retries in case of failure in connection. ● To achieve this, retry mechanism we can use Until Successful ● The until successful scope is one of the scopes available in Mule which processes messages through its processors until the process succeeds. ● After passing a message into the until successful scope, the main flow immediately regains control of the thread. ● By default, the Until Successful scope runs asynchronously, but you can always configure it as synchronous. 17
  • 18. Retry ● maxRetries: Specifies the maximum number of retries that are attempted. ● millisBetweenRetries: Specifies the minimum interval between two attempts to process, in milliseconds. The actual interval depends on the previous execution but should not exceed twice this number. The default value is 60000 milliseconds (one minute). 18
  • 19. 19
  • 20. Reprocessing ● MuleSoft allows you to process messages as a batch which can be achieved by batch scope. ● Batch scope in a mule application can divide the input payload into individual records, performs actions on these individual records, and then sends the processed data to target systems. ● Within an application, you can initiate a Batch Job scope, which splits messages into individual records, performs actions upon each record, and then reports on the results and potentially pushes the processed output to other systems or queues. 20
  • 21. 21
  • 22. Log Management ● Logging is useful for monitoring and troubleshooting your Mule applications and the Mule server whether that's recording errors raised by the application or specific details, such as status notifications, custom metadata, and payloads. ● Loggers can be configured to determine what specific packages are to be logged and to what depth where packages are a grouped set of classes and interfaces, represented by a namespace. ● Appenders essentially describe how to deliver the logging events to a destination. Think about where you typically see log events outputted from your Mule applications the Console view in Anypoint Studio and the log files of the application itself both are examples of Appenders 22
  • 25. Fields: Message, Level, Category ● Message : Specifies the Mule log message. By default, messages are logged to the application’s log file. ● Level : Specifies the log level. Available options are DEBUG , ERROR , INFO(Default) , TRACE , WARN ● Category : Optional setting that specifies a category name that it adds to log4j2.xml file. For example, you might use a category to route your log messages based on your category, or you might set log levels based on category. 25
  • 26. 26 ● Share: ○ Tweet using the hashtag #MuleSoftMeetups ○ Invite your network to join: https://meetups.mulesoft.com/dubai/ 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?
  • 27. Introduce yourself to your neighbor Networking time