10_Errors Flashcards

1
Q

If there is no error handler defined then what is used?

A

Mule default error handler

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Can the Mule default error handler be configured?

A

No

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What happens to the flow when the Mule default error handler is used?

A

The execution of the flow is stopped (and information about the error is logged)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Give an example of 2 properties of the error object?

A

error.description - a string and error.errorType - an object

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How are the error types identified?

A

Namespace and identifier e.g. HTTP:UNAUTHORIZED

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the LHS and RHS of the example ‘HTTP:CONNECTIVITY’?

A

Namespace - LHS and Identifier - RHS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the most general error type?

A

ANY

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Do error types follow a hierarchy?

A

Yes - each error type has a parent

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Can the error be handled if it is under critical?

A

No - cannot be handled

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the default success response for a HTTP Listener?

A
  • payload

- status code 200

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the default error response for a HTTP Listener?

A
  • error description

- status code 500

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Can you override the response values for a HTTP Listener?

A

Yes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Where can error handlers be added to?

A
  • an Application (outside of flows)
  • a flow
  • a selection of one or more event processors
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How many event processors can an error scope contain?

A

Any number of event processors.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What 2 types of error handler scopes are there?

A

On Error Continue

and On Error Propagate

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What happens to the flow after the On Error Propagate/Continue error handler scope has been completed (regarding execution)?

A

The rest of the flow that threw the error will not be executed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

After the On Error Continue scope has been completed, what happens to the event?

A

It is passed up to the next level as if the flow execution had been completed successfully. (Key part here - thrown the the NEXT LEVEL, as the execution of the flow that threw the error will not execut)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

An HTTP Listener will return what response after the flow throws an error to the On Error Propagate?

A

error response

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

An HTTP Listener will return what response after the flow throws an error to the On Error Continue?

A

successful response

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Flow - no error handler. What happens?

A

Mule default error handler executed. Error response.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Flow - On Error Propagate scope. What happens when an error is thrown in the flow?

A

On Error Propagate error handler executed. Error thrown.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Flow - On Error Continue scope. What happens when an error is thrown in the flow.

A

On Error Continue error handler executed. Successful response. Rest of flow not executed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Parent Flow - On Error Propagate, Flow Reference - Child Flow. Child Flow - On Error Propagate. Error occurs in the child flow, that happens?

A

Child Flow On Error Propagate scope executed. Throws error to next level. Parent Flow throws error. On Error Propagate scope executed. Error returned.

24
Q

Parent Flow - On Error Continue Flow Reference - Child Flow. Child Flow - On Error Propagate. Error occurs in the child flow, that happens?

A

Child flow On Error Propagate error handler executed. Error thrown to next level (parent). On Error Continue error handler executed. Successful response returned.

25
Q

Parent Flow - On Error Propagate or On Error Continue, Flow Reference - Child Flow. Child Flow - On Error Continue. Error occurs in the child flow, that happens?

A

On Error Continue error handler executed. Successful response returned. The Parent Flow is executed (subsequent processors ARE executed). Success or error response returned depending on subsequent processors.

26
Q

Where should you put a default error handler for your application? (an application level error handler).

A

Typically, in the global configuration file.

27
Q

How do you create an application level error handler?

A
  • add an error handler outside a flow, typically, in the global configurations file
  • Specify that this handler is to be the application’s default error handler (configurations).
28
Q

Each error handler can contain one or more ?

A

error handler scopes

29
Q

What can each of the error handler scopes specify?

A

The type of error that they will handle or a condition. If the condition evaluates to true then that scope will be executed.

30
Q

If there are multiple error handler scopes, what error scope will be executed?

A

The first error scope that the condition evaluates to true.

31
Q

What is the default error type?

A

ANY

32
Q

What do you set to specify error execution upon a specigic confition?

A

Set the WHEN condition to a boolean DataWeave expression.

33
Q

Examples of conditions that could be used in the when of a error handler?

A

error.errorType.namespace == ‘HTTP’
OR
error.cause.message contains ‘request unauthorized’

34
Q

What flows can’t have error handlers?

A

subflows

35
Q

If a flow does not have an error handler, what happens?

A

The error is handled by a scope in an application’s default error handler.

36
Q

If a flow has an error handler, what happens when an error is thrown?

A

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 applications global default handler. Note: it says that the ‘first whose scope condition is true,which may propagate or continue otherwise it is handled by the Mule default error handler. ‘

37
Q

If flow has no error handler, and the application default error handler has no matching scope condition. What happens when an error is thrown?

A

Mule default error handler is executed. Error rethrown. Error response returned.

38
Q

If flow has no error handler, and the application default error handler has a matching scope condition. What happens when an error is thrown?

A

Application default error handler is executed. Error rethrown. Error response returned.

39
Q

If flow has error handlers but none of the conditions are met on any, and the application default error handler has no matching scope condition. What happens when an error is thrown?

A

Mule default error handler executed. Error rethrown. Error returned.

40
Q

If flow has error handlers but none of the conditions are met on any, and the application default error handler has a matching scope condition. What happens when an error is thrown?

A

Mule default error handler is executed. Error re-thrown. Error response.

41
Q

How many processors can be added to a Try scope?

A

Any number of processors.

42
Q

In an On Error Continue/Propagate in a Try scope, after an error has been thrown, what happens to the execution of the rest of the try scope?

A

The rest of the Try scope is not executed.

43
Q

What happens to the error, if an On Error Propagate error handler is executed?

A

An error response is returned to the parent flow, which then handles the error.

44
Q

What happens to the error, if an On Error Continue error handler is executed?

A

The event is passed up to the parent flow, which continues execution.

45
Q

Try scope - On Error Propagate scope and Parent flow - On Error Propagate scope. What happens when the error occurs in the try scope?

A

On propagate handler executed. Error rethrown. On Error Propagate handler executed. Error rethrown. Error response.

46
Q

Try scope - On Error Continue scope and Parent flow - On Error Propagate scope. What happens when the error occurs in the try scope?

A

On error propagate handler executed. Error rethrown. On error continue handler executed. Success response. Subsequent processors are NOT executed past the try scope.

47
Q

Try scope - On Error Propagate scope and Parent flow - On Error Propagate OR Continue scope. What happens when the error occurs in the try scope?

A

On error continue handler executed. Success response rethrown. Subsequent processors are executed. A success of error response returned (base on the subsequent processors).

48
Q

What’s one way you can make error handling more granular?

A

Add custom error types

49
Q

When creating new customer error types, what should you not name them?

A

Existing module namespaces.

50
Q

Interfaces created with APIkit have error handlers with what type of scope?

A

On Error Propagate scopes.

51
Q

The main routing flow, from an interface created with APIkist has how many error scopes? Bonus - few examples?

A

6 (APIKIT:BAD_REQUEST > 400, APIKIT:NOT_FOUND > 404, APIKIT:METHOD_NOT_ALLOWED > 405,…)

52
Q

An application can have what two types of errors?

A

Messaging (within a flow whenever a Mule event is involved) or System (system-level when no Mule event is involved).

53
Q

When do system errors occur?

A

during application start-up or when a connection to an external system fails

54
Q

How are system errors handled?

A

Through a system error handling strategy that is non-configurable. It will log the error and if it’s a connection failure - it will execute the re-connection strategy.

55
Q

Where do you set the Re-connection strategies?

A

Set for a connector (in Global Elements Properties) for a specific connector operation (in Properties view)

56
Q

What do the error scopes from the interfaces created with APIkit set?

A

HTTP status codes and response messages.

57
Q

After an error scope has been executed from an interface that has been created by APIkit, where does it pass the event/error to?

A

Back to the main router (or main router flow)