File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -2,13 +2,19 @@ package mfa
2
2
3
3
import (
4
4
"log"
5
+ "net/http"
5
6
)
6
7
7
8
type App struct {
8
9
config EnvConfig
9
10
db * Storage
10
11
}
11
12
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
+
12
18
// NewApp creates a new App containing configuration and service clients
13
19
func NewApp (cfg EnvConfig ) * App {
14
20
db , err := NewStorage (cfg .AWSConfig )
Original file line number Diff line number Diff line change @@ -31,5 +31,6 @@ func getRoutes(app *mfa.App) map[string]http.HandlerFunc {
31
31
"PUT /webauthn/login" : app .FinishLogin ,
32
32
"DELETE /webauthn/user" : app .DeleteUser ,
33
33
"DELETE /webauthn/credential/{" + mfa .IDParam + "}" : app .DeleteCredential ,
34
+ "POST /api-key/error" : app .FakeError ,
34
35
}
35
36
}
You can’t perform that action at this time.
0 commit comments