diff --git a/block_conv.go b/block_conv.go index d7584957..57fd85cd 100644 --- a/block_conv.go +++ b/block_conv.go @@ -2,7 +2,6 @@ package slack import ( "encoding/json" - "errors" "fmt" ) @@ -137,7 +136,7 @@ func (b *InputBlock) UnmarshalJSON(data []byte) error { case "number_input": e = &NumberInputBlockElement{} default: - return errors.New("unsupported block element type") + return fmt.Errorf("unsupported block element type %v", s.TypeVal) } if err := json.Unmarshal(a.Element, e); err != nil { @@ -443,7 +442,7 @@ func (e *ContextElements) UnmarshalJSON(data []byte) error { e.Elements = append(e.Elements, elem.(*ImageBlockElement)) default: - return errors.New("unsupported context element type") + return fmt.Errorf("unsupported context element type %v", contextElementType) } }