Skip to content

Instantly share code, notes, and snippets.

@anderseknert
Created September 20, 2023 12:51
Show Gist options
  • Save anderseknert/f20d1f1a6ce8d96558e7bb0646df3957 to your computer and use it in GitHub Desktop.
Save anderseknert/f20d1f1a6ce8d96558e7bb0646df3957 to your computer and use it in GitHub Desktop.
Object-based OR
deny := message if {
code_reason_map := {
400: "Bad request",
404: "Not found",
500: "Internal server error",
}
message := code_reason_map[status_code]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment