Open ashmeet-kandhari opened 1 year ago
An error happened when publishing the component: {}
--- ./oc-patch/oc-registry-routes/publish_original.js 2023-03-01 11:37:29.000000000 +0000 +++ ./oc-patch/oc-registry-routes/publish_modified.js 2023-03-01 11:40:50.000000000 +0000 @@ -70,25 +70,35 @@ res.status(200).json({ ok: true }); } catch (err) {
if (err.code === 'not_allowed') {
Publish not allowed: ${err.msg}
Publish not allowed: ${errorMessage}
Component already exists: ${err.msg}
Component already exists: ${errorMessage}
Component name not valid: ${err.msg}
Component name not valid: ${errorMessage}
Component version not valid: ${err.msg}
Component version not valid: ${errorMessage}
Publish failed: ${err.msg}
Publish failed: ${errorMessage}
The whole treating of errors should be normalized honestly across the codebase, but I'm fine with this adhoc solution for the moment
Thanks @ricardo-devis-agullo , Raised PR for review
Who is the bug affecting?
What is affected by this bug?
When does this occur?
Where on the platform does it happen?
How do we replicate the issue?
Expected behavior (i.e. solution)
What version of OC, Node.js and OS are you using?
Other Comments
Publish not allowed: ${err.msg}
;Publish not allowed: ${errorMessage}
;Component already exists: ${err.msg}
;Component already exists: ${errorMessage}
;Component name not valid: ${err.msg}
;Component name not valid: ${errorMessage}
;Component version not valid: ${err.msg}
;Component version not valid: ${errorMessage}
;Publish failed: ${err.msg}
;Publish failed: ${errorMessage}
;