Skip to content

Commit

Permalink
fix err panic
Browse files Browse the repository at this point in the history
  • Loading branch information
smith committed Apr 4, 2024
1 parent 44961be commit be7d4d3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -996,7 +996,7 @@ var SwaggerInfo = &swag.Spec{
BasePath: "/",
Schemes: []string{"http"},
Title: "OPC-UA Open API",
Description: "OPC-UA转http协议",
Description: "OPC-UA转http协议\n两步完成opcua到http协议的转换:",
InfoInstanceName: "swagger",
SwaggerTemplate: docTemplate,
LeftDelim: "{{",
Expand Down
2 changes: 1 addition & 1 deletion docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
],
"swagger": "2.0",
"info": {
"description": "OPC-UA转http协议",
"description": "OPC-UA转http协议\n两步完成opcua到http协议的转换:",
"title": "OPC-UA Open API",
"contact": {
"email": "[email protected]"
Expand Down
4 changes: 3 additions & 1 deletion docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,9 @@ host: localhost:8080
info:
contact:
email: [email protected]
description: OPC-UA转http协议
description: |-
OPC-UA转http协议
两步完成opcua到http协议的转换:
title: OPC-UA Open API
version: "1.0"
paths:
Expand Down
4 changes: 2 additions & 2 deletions http_service/routers/webhook_routers/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -926,9 +926,9 @@ func DalDeleteCondition(id int64) {
sqlErr, ok := err.(*pgconn.PgError)
if ok {
slog.Error(utils.WrapError(err).Error())
panic(core.NewKnownError(core.FieldNotUnique, err, sqlErr.Message))
panic(core.NewKnownError(core.EntityNotFound, err, sqlErr.Message))
}
slog.Error(utils.WrapError(err).Error())
panic(core.NewKnownError(core.FieldNotUnique, err, sqlErr.Message))
panic(err) // unknown error
}
}

0 comments on commit be7d4d3

Please sign in to comment.