Szymon
4 years agoNew Contributor II
Binary output - error pipeline - custom http codes
There is a requirement for the following:
Error pipeline for an ultra pipeline which responses with custom HTTP code, e.g. 500.
Why:
…The third party API caller shall receive a proper HTTP code...
- 4 years ago
Using a mapper and assuming your input text is at the key
$text
you can use the following expression to achieve your goal:$text.split("").reverse().reduce((accum, cur) => (accum.length - accum.split("+").length +1) % 3 == 0 ? accum + "+" + cur: accum + cur).split("").reverse().join("")