Skip to content

Commit 27a22c6

Browse files
authored
Fixing custom asset id upload (#2305)
fixing custom asset id
1 parent 4d96574 commit 27a22c6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

cmd/httpx/httpx.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,11 @@ func setupOptionalAssetUpload(opts *runner.Options) *pdcp.UploadWriter {
131131
opts.OnClose = func() {
132132
writer.Close()
133133
}
134+
134135
// add additional metadata
135136
if opts.AssetID != "" {
136137
// silently ignore
137-
_ = writer.SetAssetID(opts.AssetID)
138+
writer.SetAssetID(opts.AssetID)
138139
}
139140
if opts.AssetName != "" {
140141
// silently ignore

internal/pdcp/writer.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,11 @@ func (u *UploadWriter) GetWriterCallback() runner.OnResultCallback {
9999
}
100100

101101
// SetAssetID sets the scan id for the upload writer
102-
func (u *UploadWriter) SetAssetID(id string) error {
102+
func (u *UploadWriter) SetAssetID(id string) {
103103
if !xidRegex.MatchString(id) {
104-
return fmt.Errorf("invalid asset id provided")
104+
gologger.Warning().Msgf("invalid asset id provided (unknown xid format): %s", id)
105105
}
106106
u.assetGroupID = id
107-
return nil
108107
}
109108

110109
// SetAssetGroupName sets the scan name for the upload writer

0 commit comments

Comments
 (0)