Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
api/server/httputils: ensure consistent status code
Error code resolution is powered by string matching. Not the greatest thing in the world and I hope no one is proud of this code, but it works. However, because a map is used, the iteration order of the map is random, such that if an error matches two of the snippets, it may return a different error code depending on the seed of the hashmap. This change converts it to use a slice instead. Signed-off-by: Stephen J Day <[email protected]>
- Loading branch information