Skip to content

Commit 9a7fd29

Browse files
committed
fix GetUploadURLExternalContext error message
1 parent 53a00c2 commit 9a7fd29

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

files.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -510,10 +510,10 @@ func (api *Client) ShareFilePublicURLContext(ctx context.Context, fileID string)
510510
// Slack API docs: https://api.slack.com/methods/files.getUploadURLExternal
511511
func (api *Client) GetUploadURLExternalContext(ctx context.Context, params GetUploadURLExternalParameters) (*GetUploadURLExternalResponse, error) {
512512
if params.FileName == "" {
513-
return nil, fmt.Errorf("GetUploadURLExternalContext: fileName cannot be empty")
513+
return nil, fmt.Errorf("files.getUploadURLExternal: fileName cannot be empty")
514514
}
515515
if params.FileSize == 0 {
516-
return nil, fmt.Errorf("GetUploadURLExternalContext: fileSize cannot be 0")
516+
return nil, fmt.Errorf("files.getUploadURLExternal: fileSize cannot be 0")
517517
}
518518

519519
values := url.Values{

files_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,15 +357,15 @@ func TestGetUploadURLExternalContext(t *testing.T) {
357357
FileName: "",
358358
FileSize: 10,
359359
},
360-
wantErr: fmt.Errorf("GetUploadURLExternalContext: fileName cannot be empty"),
360+
wantErr: fmt.Errorf("files.getUploadURLExternal: fileName cannot be empty"),
361361
},
362362
{
363363
title: "Testing with invalid parameters: file size 0",
364364
params: GetUploadURLExternalParameters{
365365
FileName: "test.txt",
366366
FileSize: 0,
367367
},
368-
wantErr: fmt.Errorf("GetUploadURLExternalContext: fileSize cannot be 0"),
368+
wantErr: fmt.Errorf("files.getUploadURLExternal: fileSize cannot be 0"),
369369
},
370370
}
371371

0 commit comments

Comments
 (0)