Code Review
/
src
/
xds
/
xds-server.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
history
|
raw
|
HEAD
Add gitlab issue/merge request templates
[src/xds/xds-server.git]
/
common
/
error.go
1
package common
2
3
import (
4
"github.com/gin-gonic/gin"
5
)
6
7
// APIError returns an uniform json formatted error
8
func APIError(c *gin.Context, err string) {
9
c.JSON(500, gin.H{
10
"status": "error",
11
"error": err,
12
})
13
}