Commit 94e8399
Feat: Improve Error Handling for Server.Scrape (#1158)
* Update querySettings Error Return in Scrape
If there are errors querying namespace mappings, the potential error from querySettings is obscured. Adding an immediate return if there are errors retreiving settings.
Signed-off-by: Jonathan Bowe <jonathan@bowedev.com>
* Improve Verbosity of queryNamespaceMappings Errors
Previously if any errors were encountered by queryNamespaceMappings, only a count of those errors was returned - making debugging those errors harder than it needs to be.
I'm changing this to immediately return nil if no errors are encountered, and otherwise an error will be formatted with each of the namespaces and what the error was for that namespace.
Signed-off-by: Jonathan Bowe <jonathan@bowedev.com>
* Simplify Error Message
Co-authored-by: Ben Kochie <superq@gmail.com>
Signed-off-by: Jonathan Bowe <bowejonathan99@gmail.com>
---------
Signed-off-by: Jonathan Bowe <jonathan@bowedev.com>
Signed-off-by: Jonathan Bowe <bowejonathan99@gmail.com>
Co-authored-by: Ben Kochie <superq@gmail.com>1 parent d1a957f commit 94e8399
1 file changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| 122 | + | |
122 | 123 | | |
123 | 124 | | |
124 | 125 | | |
125 | 126 | | |
126 | | - | |
127 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
128 | 133 | | |
129 | 134 | | |
130 | 135 | | |
| |||
0 commit comments