mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 18:15:42 +01:00
Merge pull request #39 from csaf-poc/improve_tlp_error_message
Improve error message of missing tlp
This commit is contained in:
commit
a02c1cea6c
1 changed files with 2 additions and 1 deletions
|
|
@ -180,7 +180,8 @@ func (c *controller) upload(r *http.Request) (interface{}, error) {
|
|||
// Extract real TLP from document.
|
||||
if t == tlpCSAF {
|
||||
if t = tlp(strings.ToLower(ex.tlpLabel)); !t.valid() || t == tlpCSAF {
|
||||
return nil, fmt.Errorf("not a valid TL: %s", ex.tlpLabel)
|
||||
return nil, fmt.Errorf(
|
||||
"valid TLP label missing in document (found '%s')", t)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue