Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve clarity of 'content' error message for files_upload_v2 #1278

Merged
merged 1 commit into from
Oct 24, 2022
Merged

Improve clarity of 'content' error message for files_upload_v2 #1278

merged 1 commit into from
Oct 24, 2022

Conversation

eddyg
Copy link
Contributor

@eddyg eddyg commented Oct 16, 2022

Summary

Very simple PR to improve the clarity of the error message raised when 'content' is specified and it's not the correct type. (Feel free to edit as you see fit, or simply disregard if it's too minor.)

It is worth noting that the else case of this comparison (where neither content nor file_uploads is specified) is already handled here (for the async client) and here (regular).

Category (place an x in each of the [ ])

  • slack_sdk.web.WebClient (sync/async) (Web API client)
  • slack_sdk.webhook.WebhookClient (sync/async) (Incoming Webhook, response_url sender)
  • slack_sdk.socket_mode (Socket Mode client)
  • slack_sdk.signature (Request Signature Verifier)
  • slack_sdk.oauth (OAuth Flow Utilities)
  • slack_sdk.models (UI component builders)
  • slack_sdk.scim (SCIM API client)
  • slack_sdk.audit_logs (Audit Logs API client)
  • slack_sdk.rtm_v2 (RTM client)
  • /docs-src (Documents, have you run ./scripts/docs.sh?)
  • /docs-src-v2 (Documents, have you run ./scripts/docs-v2.sh?)
  • /tutorial (PythOnBoardingBot tutorial)
  • tests/integration_tests (Automated tests for this library)

Requirements (place an x in each [ ])

  • I've read and understood the Contributing Guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've run python3 -m venv .venv && source .venv/bin/activate && ./scripts/run_validation.sh after making the changes.

@seratch seratch self-assigned this Oct 17, 2022
@seratch seratch added bug M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented web-client Version: 3x labels Oct 17, 2022
@seratch seratch added this to the 3.19.2 milestone Oct 17, 2022
Copy link
Member

@seratch seratch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Looks good to me.

@codecov
Copy link

codecov bot commented Oct 17, 2022

Codecov Report

Merging #1278 (18496f7) into main (3fda85a) will increase coverage by 0.06%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #1278      +/-   ##
==========================================
+ Coverage   85.63%   85.70%   +0.06%     
==========================================
  Files          84       84              
  Lines        7826     7826              
==========================================
+ Hits         6702     6707       +5     
+ Misses       1124     1119       -5     
Impacted Files Coverage Δ
slack_sdk/socket_mode/builtin/internals.py 74.24% <0.00%> (+2.14%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@seratch seratch merged commit 85aad77 into slackapi:main Oct 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented Version: 3x web-client
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants