Commit a40eb33
authored
Fix panic message to show correct unhandled type rather than the parent type (#969)
I was trying to model a block that had `map[string][]string` as it's schema,
but the code was panicking with:
```
Unknown validation type: 6
```
Debugging, and it became clear that non-primitive types are not
supported in the switch, but I was puzzled as to why it was reporting
that a `TypeMap` was not a valid map value.
The switch is against `valueType`, so it makes sense (to me at least)
that the panic should report that as the unknown validation type.
With this change, the code would report:
```
Unknown validation type: 7
```
Where 7 equates to `TypeSet` (aka. the string slice value of the map)1 parent a34f8f0 commit a40eb33
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2134 | 2134 | | |
2135 | 2135 | | |
2136 | 2136 | | |
2137 | | - | |
| 2137 | + | |
2138 | 2138 | | |
2139 | 2139 | | |
2140 | 2140 | | |
| |||
0 commit comments