Skip to content

Commit 4800b74

Browse files
committed
add a new endpoint just to see that Sentry works as expected
1 parent a5ea430 commit 4800b74

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

app.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,19 @@ package mfa
22

33
import (
44
"log"
5+
"net/http"
56
)
67

78
type App struct {
89
config EnvConfig
910
db *Storage
1011
}
1112

13+
func (a *App) FakeError(w http.ResponseWriter, r *http.Request) {
14+
jsonResponse(w, "this is a test message generated to confirm Sentry is working", http.StatusInternalServerError)
15+
log.Printf("this is a test log entry generated to confirm Sentry is working")
16+
}
17+
1218
// NewApp creates a new App containing configuration and service clients
1319
func NewApp(cfg EnvConfig) *App {
1420
db, err := NewStorage(cfg.AWSConfig)

router/router.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,6 @@ func getRoutes(app *mfa.App) map[string]http.HandlerFunc {
3131
"PUT /webauthn/login": app.FinishLogin,
3232
"DELETE /webauthn/user": app.DeleteUser,
3333
"DELETE /webauthn/credential/{" + mfa.IDParam + "}": app.DeleteCredential,
34+
"POST /api-key/error": app.FakeError,
3435
}
3536
}

0 commit comments

Comments
 (0)