漳州微网站建设公司,望牛墩网站建设公司,家具设计用什么软件最好,现代网站开发建设今天一个同事的接口突然报409,大概百度了一下,不是很清楚,谷歌也没找到特别好的解释 因为是直接调用的gitlab,就直接看了下gitlab的api The following table shows the possible return codes for API requests. Return valuesDescription200 OKThe GET, PUT or DELETE request…
今天一个同事的接口突然报409,大概百度了一下,不是很清楚,谷歌也没找到特别好的解释 因为是直接调用的gitlab,就直接看了下gitlab的api The following table shows the possible return codes for API requests. Return valuesDescription200 OKThe GET, PUT or DELETE request was successful, and the resource itself is returned as JSON.202 AcceptedThe GET, PUT or DELETE request was successful, and the resource is scheduled for processing.204 No ContentThe server has successfully fulfilled the request, and there is no additional content to send in the response payload body.201 CreatedThe POST request was successful, and the resource is returned as JSON.304 Not ModifiedThe resource hasnt been modified since the last request.400 Bad RequestA required attribute of the API request is missing. For example, the title of an issue is not given.401 UnauthorizedThe user isnt authenticated. A valid user token is necessary.403 ForbiddenThe request isnt allowed. For example, the user isnt allowed to delete a project.404 Not FoundA resource couldnt be accessed. For example, an ID for a resource couldnt be found.405 Method Not AllowedThe request isnt supported.409 ConflictA conflicting resource already exists. For example, creating a project with a name that already exists.412The request was denied. This can happen if the If-Unmodified-Since header is provided when trying to delete a resource, which was modified in between.422 UnprocessableThe entity couldnt be processed.429 Too Many RequestsThe user exceeded the application rate limits.500 Server ErrorWhile handling the request, something went wrong on the server.gitlab解释的很清晰,就是说资源已经存在了,再次创建失败 那为什么接口没有将报错message展示出来,查了一下代码是因为直接屏蔽了409状态码,直接用postman访问接口会返回具体错误信息,错误提示信息示例:
示例1:
{ message: Email has already been taken
}
示例2:
{ message: Username has already been taken
} 找gitlab负责人查了下数据,确实是用户已经存在了,但是用户状态是blocked(禁用),问题解决