forked from Trustie/forgeplus
新增:更改文件内容错误返回
This commit is contained in:
parent
82f9ddef6e
commit
c20bd19796
|
|
@ -65,6 +65,13 @@ class Gitea::Repository::Entries::CreateService < Gitea::ClientService
|
|||
error("#{filepath}文件已存在,不能重复创建!")
|
||||
end
|
||||
end
|
||||
when 500
|
||||
Rails.logger.error("Gitea api url==#{url},status:#{status},body=#{body}")
|
||||
if json_parse!(body)["message"].present? && json_parse!(body)["message"].include?("PushRejected Error")
|
||||
error("提交被拒绝,分支被锁定,请稍后重试。")
|
||||
else
|
||||
error("系统错误!")
|
||||
end
|
||||
else
|
||||
Rails.logger.error("Gitea api url==#{url},status:#{status},body=#{body}")
|
||||
error("系统错误!")
|
||||
|
|
|
|||
Loading…
Reference in New Issue