-
Notifications
You must be signed in to change notification settings - Fork 28
v1.4.1 Fix custom header config/params not applied to API request #24
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Xaxxis adding enhancement to this bugfix is not a good idea. Please fix this PR or re-open PR so it contains the bugfix parts only and with v1.4.1
Will explain why later.
The bugfix parts looks good (approved) ✅ , so once you have PR for bugfix parts only, you can go ahead merge & release. |
Some of the reasons:
So that's why better release the bugfix first as v1.4.1 , then we can take time with the v1.5 enhancement. Bug fix is more prioritized. |
midtransclient/http_client.py
Outdated
message='The ServerKey is invalid, as it is an empty string or Null. Please double-check your API key. You can check the ServerKey from the Midtrans Dashboard. See https://docs.midtrans.com/en/midtrans-account/overview?id=retrieving-api-access-keys for the details or contact support at support@midtrans.com if you have any questions.', | ||
api_response_dict=None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review for the enhancement part (to address later after bugfix release):
- I think Bintar's team is starting to deprecate email support in favor of website contact form. Should replace the email with URL instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, sure will remove the email
midtransclient/http_client.py
Outdated
if " " in server_key: | ||
raise MidtransAPIError( | ||
message='The ServerKey is contains white-space. Please double-check your API key. You can check the ServerKey from the Midtrans Dashboard. See https://docs.midtrans.com/en/midtrans-account/overview?id=retrieving-api-access-keys for the details or contact support at support@midtrans.com if you have any questions.', | ||
api_response_dict=None, | ||
http_status_code=0, | ||
raw_http_client_data=None | ||
) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Grammar issue, no need is
.
Btw this is my opinion, but feel free to decide. I don't think we should check for whitespace or any specific chars, because the Spec can change from API side. And if it changed, we will need to edit this kind of logic manually each time. Also I think the API raw error message in this scenario already tell merchant that ServerKey is invalid.
So IMO the benefit is small & the potential maintenance burden is higher.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure will remove this part. Thanks da
@Xaxxis I will change/revert this PR into the fixed part ya. Thanks |
Done the PR revert to Fix bug only ya @rizdaprasetya |
Great thanks @Xaxxis, merged. Please try to continue to release ya, let me know if any issue. |
Bug Fix