Skip to content

Instantly share code, notes, and snippets.

@kroepke
Created April 22, 2016 08:59
Show Gist options
  • Save kroepke/27de3bfa2123c5b9ef091888068526cb to your computer and use it in GitHub Desktop.
Save kroepke/27de3bfa2123c5b9ef091888068526cb to your computer and use it in GitHub Desktop.
rule "static mapping"
when has_field("status_code")
then
let mapping = {`404`: "not found", `500`: "server error"};
set_field("status_code", mapping[to_string($message.status_code)]);
end
@kroepke
Copy link
Author

kroepke commented Jul 26, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment