Errors adding/saving and publishing/unpublishing Designs

Hi Team,

I’m currently coming up against what might be two bugs, but I wanted to see if the community could help and maybe it’s something wrong with my own local meshery.

Context:

I’m currently working on migrating the current dataFetch implementation for the api/pattern/catalog/publish and api/pattern/catalog/unpublish routes within the ui/components/MesheryPatterns.js file. While I believe I’ve successfully finished the migration, when I try to test that my code doesn’t break anything by creating a new design and trying to publish/unpublish, I am coming up against two errors. In order to test from before my changes, I reverted back to the original dataFetch implementation and still see the same errors:

  1. I am unable to create a new design:

and futher examination leads to me a 1026 error:

and after finding the error in the docs, it seems to be happening because of an empty request body, though I don’t see any mention of where to put the body or a mention of the body in the docs:

  1. I tried to clone a design, since I can’t create a new one currently, but I can’t publish/unpublish it:

Would someone be able to help? I’m currently stuck on my PR, even though my migration looks good, I would rather not submit the PR if I can’t test my changes locally. Thank you!

1 Like

for #2 design file should have valid name other than untitled design to get publish button enable

1 Like

And if you are just testing your changes , try to publish any existing design public one from development environment.

1 Like

using edit option you can change file name if its untitled

1 Like

Hey @Sudhanshu_Dasgupta, thanks for the response! I was able to successfully test that my migration works for publishing a new design.

However I receive an unauthorized error when I try to unpublish a design:

I reverted back to the original dataFetch implementation and still received the same error. Is there a way I can change my user role to admin?




Additionally, I tried to edit an existing Design, and still get the same errors as before when trying to update the design name and not having it be Untitled. However this isn’t as pressing since it’s not blocking my in unpublishing, just wanted to make a note:

Yes you need to be admin to unpublish anyhow if payload is correct and request is correct then you r changes are most probably correct. So you can move forward and migrate other areas as well. I will test your pr when done.
Anyhow admin access are given by provider admins.

1 Like