Added more error handling and necessary functions
This commit is contained in:
@@ -28,6 +28,6 @@ func NewContent(contentType int, mediaType string, content any) (Content, error)
|
||||
case 3:
|
||||
return newOutOfLineContent(mediaType, content)
|
||||
default:
|
||||
return nil, fmt.Errorf("%v is not a valid text type", contentType)
|
||||
return nil, fmt.Errorf("error creating new content: %v is not a valid text type", contentType)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user