-
-
Notifications
You must be signed in to change notification settings - Fork 377
406 api error #37
Comments
@nithinnitzarya try $asset = [
'key' => 'layout/theme.liquid',
'value' => 'hello'
]; It looks like you have an unnecessary array |
I changed that but again got an another error - Client error: |
@ncpope @ohmybrew Any Solution? still am getting these errors. I have tried a lot of combinations |
@nithinnitzarya keep in mind this package provides a wrapper to Guzzle for making the HTTP request. What @ncpope recommended resolved the 406 error - have you looked specifically at the 422 error response in terms of the missing content? The 422 is telling us that the request was processed by Shopify's API and it didn't meet the validation for updating the underlying resource. Hope this helps. |
@brianakidd @ncpope Wow !!! Finally !! Validation was the issue. I was trying to write on the theme file without header and layout. |
Hi,
I tried to insert a code using asset API of Shopify. but it returned a 406 error - Client error:
PUT https://good-time-store.myshopify.com/admin/themes/14690353211/assets.json
resulted in a406 Not Acceptable
responseThis is my code
$api = $shop->api();
$asset = [
[
'key' => 'layout/theme.liquid',
'value' => 'hello'
]];
The text was updated successfully, but these errors were encountered: