René's URL Explorer Experiment


Title: Returned error in result missing error subject (discovered in metafield create/update) · Issue #204 · Shopify/shopify_python_api · GitHub

Open Graph Title: Returned error in result missing error subject (discovered in metafield create/update) · Issue #204 · Shopify/shopify_python_api

X Title: Returned error in result missing error subject (discovered in metafield create/update) · Issue #204 · Shopify/shopify_python_api

Description: The shopify API returns the subject of an error as a key in the json error string, and pyactiveresource sometimes adds the value but not the key when it unpacks the string. This probably shows up for some errors generated when adding or ...

Open Graph Description: The shopify API returns the subject of an error as a key in the json error string, and pyactiveresource sometimes adds the value but not the key when it unpacks the string. This probably shows up f...

X Description: The shopify API returns the subject of an error as a key in the json error string, and pyactiveresource sometimes adds the value but not the key when it unpacks the string. This probably shows up f...

Opengraph URL: https://github.com/Shopify/shopify_python_api/issues/204

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Returned error in result missing error subject (discovered in metafield create/update)","articleBody":"The shopify API returns the subject of an error as a key in the json error string, and pyactiveresource sometimes adds the value but not the key when it unpacks the string.\r\n\r\nThis probably shows up for some errors generated when adding or modifying variants or metafields, as they show up as lists of hashes in the object attributes. I hit a problem when adding or updating a metafield on a variant, and decided to dig.\r\n\r\nThe issue is in class Errors in activeresource.py:\r\n\r\n\u003cpre\u003e\r\n    def from_hash(self, messages):\r\n        attribute_keys = self.base.attributes.keys()\r\n        for key, errors in six.iteritems(messages):\r\n            for message in errors:\r\n                if key in attribute_keys:\r\n                    self.add(key, message)\r\n                else:\r\n                    self.add_to_base(message)\r\n\u003c/pre\u003e\r\n\r\nAn error return like this:\r\n\r\n\u003cpre\u003e\r\n{\r\n    \"errors\": {\r\n        \"metafields.namespace\": [\"can't be blank\", \"is too short (minimum is 3 characters)\"]\r\n    }\r\n}\r\n\u003c/pre\u003e\r\n\r\n(caused by trying to create or update a metafield with the key \"name-space\" instead of \"namespace\" :) will lose the important tidbit, the field causing the issue: \"metafields\" is a key in the variant attributes, but \"metafields.namespace\" is not.\r\n\r\nPerhaps this might be a more robust approach?\r\n\r\n\u003cpre\u003e\r\n    def from_hash(self, messages):\r\n        attribute_keys = self.base.attributes.keys()\r\n        for key, errors in six.iteritems(messages):\r\n            for message in errors:\r\n                if key.split('.')[0] in attribute_keys:\r\n                    self.add(key, message)\r\n                else:\r\n                    self.add_to_base(' '.join([key, message]))\r\n\u003c/pre\u003e\r\n\r\nThanks!\r\n\r\nRick\r\n\r\n\r\n ","author":{"url":"https://github.com/rlevine","@type":"Person","name":"rlevine"},"datePublished":"2017-07-12T17:04:15.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/204/shopify_python_api/issues/204"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:a794ac43-444a-9947-487f-1e2aa3adae1d
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA502:12F8:25C1689:34A2CE0:6969440D
html-safe-nonce76ad9827f93781e4cb0f18946b8ef7b51925e4b902c1b231904166685c80bb10
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNTAyOjEyRjg6MjVDMTY4OTozNEEyQ0UwOjY5Njk0NDBEIiwidmlzaXRvcl9pZCI6IjI2NDIzNTc4NjkwMzcwNDQ3NDkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac94abeebd10a84ff4985e19732450cf273790cd65691a8fca06327e592e3e3f9a
hovercard-subject-tagissue:242450561
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/Shopify/shopify_python_api/204/issue_layout
twitter:imagehttps://avatars.githubusercontent.com/u/8085?s=400&v=4
twitter:cardsummary
og:imagehttps://avatars.githubusercontent.com/u/8085?s=400&v=4
og:image:altThe shopify API returns the subject of an error as a key in the json error string, and pyactiveresource sometimes adds the value but not the key when it unpacks the string. This probably shows up f...
og:site_nameGitHub
og:typeobject
og:author:usernamerlevine
hostnamegithub.com
expected-hostnamegithub.com
None54182691a21263b584d2e600b758e081b0ff1d10ffc0d2eefa51cf754b43b51d
turbo-cache-controlno-preview
go-importgithub.com/Shopify/shopify_python_api git https://github.com/Shopify/shopify_python_api.git
octolytics-dimension-user_id8085
octolytics-dimension-user_loginShopify
octolytics-dimension-repository_id2249127
octolytics-dimension-repository_nwoShopify/shopify_python_api
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id2249127
octolytics-dimension-repository_network_root_nwoShopify/shopify_python_api
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
released69ac0477df0f87da03b8b06cebd187012d7a930
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/Shopify/shopify_python_api/issues/204#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FShopify%2Fshopify_python_api%2Fissues%2F204
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FShopify%2Fshopify_python_api%2Fissues%2F204
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=Shopify%2Fshopify_python_api
Reloadhttps://github.com/Shopify/shopify_python_api/issues/204
Reloadhttps://github.com/Shopify/shopify_python_api/issues/204
Reloadhttps://github.com/Shopify/shopify_python_api/issues/204
Shopify https://github.com/Shopify
shopify_python_apihttps://github.com/Shopify/shopify_python_api
Notifications https://github.com/login?return_to=%2FShopify%2Fshopify_python_api
Fork 390 https://github.com/login?return_to=%2FShopify%2Fshopify_python_api
Star 1.4k https://github.com/login?return_to=%2FShopify%2Fshopify_python_api
Code https://github.com/Shopify/shopify_python_api
Issues 13 https://github.com/Shopify/shopify_python_api/issues
Pull requests 11 https://github.com/Shopify/shopify_python_api/pulls
Actions https://github.com/Shopify/shopify_python_api/actions
Models https://github.com/Shopify/shopify_python_api/models
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/Shopify/shopify_python_api/security
Please reload this pagehttps://github.com/Shopify/shopify_python_api/issues/204
Insights https://github.com/Shopify/shopify_python_api/pulse
Code https://github.com/Shopify/shopify_python_api
Issues https://github.com/Shopify/shopify_python_api/issues
Pull requests https://github.com/Shopify/shopify_python_api/pulls
Actions https://github.com/Shopify/shopify_python_api/actions
Models https://github.com/Shopify/shopify_python_api/models
Security https://github.com/Shopify/shopify_python_api/security
Insights https://github.com/Shopify/shopify_python_api/pulse
New issuehttps://github.com/login?return_to=https://github.com/Shopify/shopify_python_api/issues/204
New issuehttps://github.com/login?return_to=https://github.com/Shopify/shopify_python_api/issues/204
Returned error in result missing error subject (discovered in metafield create/update)https://github.com/Shopify/shopify_python_api/issues/204#top
feature requesthttps://github.com/Shopify/shopify_python_api/issues?q=state%3Aopen%20label%3A%22feature%20request%22
https://github.com/rlevine
https://github.com/rlevine
rlevinehttps://github.com/rlevine
on Jul 12, 2017https://github.com/Shopify/shopify_python_api/issues/204#issue-242450561
feature requesthttps://github.com/Shopify/shopify_python_api/issues?q=state%3Aopen%20label%3A%22feature%20request%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.