ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 84 - Certified B2C Commerce Developer discussion

Report
Export

The Home-Show route uses this middleware chain:

server.get('Show', consentTracking.consent, cache.applyDefaultCache, function (req, res, next) { // based code here

}); The developer added Home.js in another cartridge, which is before the original cartridge in the cartridge path, to extend that route but it does not have the middleware chain:

server.append('Show', function (req, res, next) {

// custom code here });

Assuming the code is correct on both functions, what is the expected result?

A.
The custom code executes and then the base code executes
Answers
A.
The custom code executes and then the base code executes
B.
A RunTime error is thrown, "Error: Params do not match route"
Answers
B.
A RunTime error is thrown, "Error: Params do not match route"
C.
The base code executes, but the custom code is ignored because the signature lines do not match
Answers
C.
The base code executes, but the custom code is ignored because the signature lines do not match
D.
The base code executes and then the custom code executes
Answers
D.
The base code executes and then the custom code executes
Suggested answer: B
asked 23/09/2024
Antonio Carlos Figueiredo Junior
50 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first