You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// fetchErrorHandler handles errors for fetching data from the database.
42
-
funcfetchErrorHandler(c*gin.Context, errerror) {
43
+
// FetchErrorHandler handles errors for fetching data from the database.
44
+
funcFetchErrorHandler(c*gin.Context, errerror) {
43
45
iferrors.Is(err, gorm.ErrRecordNotFound) {
44
46
c.JSON(http.StatusNotFound, gin.H{"error": "Record not found"})
45
47
} else {
46
-
log.Error().Msgf("%T: %v", err, err.Error())
47
-
c.JSON(http.StatusInternalServerError, gin.H{"error": "An error occured on the server during your request, please contact your server administrator."})
"An error occured on the server during your request, please contact your server administrator. The request id is '%v', send this to your server administrator to help them finding the problem.", requestid.Get(c),
assert.Fail(t, "Unable to parse response from server %q into APIListResponse, '%v'", recorder.Body, err)
27
+
}
28
+
29
+
assert.Equal(t, "An error occured on the server during your request, please contact your server administrator. The request id is '', send this to your server administrator to help them finding the problem.", apiResponse.Error)
0 commit comments