Browse Source

fix: unexpected error type

Yeuoly 8 months ago
parent
commit
ecdc8f6fb8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      internal/service/plugin_decoder.go

+ 1 - 1
internal/service/plugin_decoder.go

@@ -42,7 +42,7 @@ func UploadPluginPkg(
 	manager := plugin_manager.Manager()
 	declaration, err := manager.SavePackage(pluginUniqueIdentifier, pluginFile)
 	if err != nil {
-		return exception.InternalServerError(errors.Join(err, errors.New("failed to save package"))).ToResponse()
+		return exception.BadRequestError(errors.Join(err, errors.New("failed to save package"))).ToResponse()
 	}
 
 	if config.ForceVerifyingSignature || verify_signature {