File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -124,10 +124,10 @@ export class AppRepo {
124124 err . code === "P2002"
125125 ) {
126126 // P2002 is "Unique Constraint Failed" - https://www.prisma.io/docs/orm/reference/error-reference#p2002
127- throw new ConflictError (
128- err . meta ? .target as string /* column name */ ,
129- err ,
130- ) ;
127+ const target = Array . isArray ( err . meta ?. target )
128+ ? err . meta . target . join ( ", " )
129+ : ( err . meta ?. target as string ) ;
130+ throw new ConflictError ( target ) ;
131131 }
132132 }
133133
Original file line number Diff line number Diff line change @@ -159,7 +159,7 @@ export const deleteNamespace = async (
159159 metadata : { name } ,
160160 } ) ;
161161 } catch ( err ) {
162- if ( err instanceof ApiException && err . code === 404 ) {
162+ if ( err instanceof ApiException && ( err . code === 404 || err . code === 403 ) ) {
163163 return ;
164164 }
165165 throw err ;
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ export async function deleteRepo(name: string) {
1111 }
1212
1313 await fetch (
14- `${ env . REGISTRY_PROTOCOL } ://${ env . REGISTRY_HOSTNAME } /projects/${ env . HARBOR_PROJECT_NAME } /repositories/${ name } ` ,
14+ `${ env . REGISTRY_PROTOCOL } ://${ env . REGISTRY_HOSTNAME } /api/v2.0/ projects/${ env . HARBOR_PROJECT_NAME } /repositories/${ name } ` ,
1515 {
1616 method : "DELETE" ,
1717 headers,
You can’t perform that action at this time.
0 commit comments