Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
enedis_sge_konnector
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
web-et-numerique
Factory
LLLE_Project
enedis_sge_konnector
Commits
f4d02eb4
Commit
f4d02eb4
authored
2 years ago
by
Bastien DUMONT
Browse files
Options
Downloads
Patches
Plain Diff
log once per second change onboarding
parent
360f587a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!27
Resolve "Mise en place de sentry - sge"
Pipeline
#48405
passed
2 years ago
Stage: test
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/core/findUserPdl.js
+1
-3
1 addition, 3 deletions
src/core/findUserPdl.js
src/core/verifyUserIdentity.js
+10
-4
10 additions, 4 deletions
src/core/verifyUserIdentity.js
with
11 additions
and
7 deletions
src/core/findUserPdl.js
+
1
−
3
View file @
f4d02eb4
...
...
@@ -59,9 +59,7 @@ async function findUserPdl(
try
{
return
parseUserPdl
(
parsedReply
)
}
catch
(
error
)
{
const
errorMessage
=
'
Error while parsing user PDL:
'
+
error
log
(
'
warn
'
,
errorMessage
)
Sentry
.
captureException
(
errorMessage
)
log
(
'
warn
'
,
'
Error while parsing user PDL:
'
+
error
)
if
(
parsedReply
.
Envelope
.
Body
.
Fault
)
{
log
(
'
warn
'
,
...
...
This diff is collapsed.
Click to expand it.
src/core/verifyUserIdentity.js
+
10
−
4
View file @
f4d02eb4
...
...
@@ -47,8 +47,9 @@ async function verifyUserIdentity(
)
if
(
!
pdl
)
{
log
(
'
warn
'
,
'
Second chance for sge onboarding
'
)
// TODO add "Second chance" to Sentry transaction
const
warningMessage
=
'
Second chance for sge onboarding
'
log
(
'
warn
'
,
warningMessage
)
Sentry
.
captureMessage
(
warningMessage
)
// Set safety onboarding in order to save it inside BO
userSafetyOnBoarding
=
true
// Backup verification
...
...
@@ -87,9 +88,10 @@ async function verifyUserIdentity(
userAddress
.
commune
.
$
.
code
)
}
// Third try, remove address number and add escalierEtEtageEtAppartement because it's buggy on SGE side
// Fourth try, remove address number and add escalierEtEtageEtAppartement because it's buggy on SGE side
if
(
!
pdl
)
{
log
(
'
warn
'
,
'
Last
chance onboarding for sge
'
)
log
(
'
warn
'
,
'
Fourth
chance onboarding for sge
'
)
pdl
=
await
findUserPdl
(
`
${
baseUrl
}
/enedis_SDE_recherche-point/1.0`
,
apiAuthKey
,
...
...
@@ -101,6 +103,10 @@ async function verifyUserIdentity(
escalierEtEtageEtAppartement
)
}
if
(
!
pdl
)
{
Sentry
.
captureException
(
'
Second chance failed, no pdl found
'
)
}
}
if
(
fields
.
pointId
!=
pdl
)
{
...
...
This diff is collapsed.
Click to expand it.
Ghost User
@ghost
mentioned in commit
a895d813
·
2 years ago
mentioned in commit
a895d813
mentioned in commit a895d813798ec350ce4ca1fcc2078869d7f80f18
Toggle commit list
Rémi PAILHAREY
@rpailharey
mentioned in commit
ae257cbf
·
2 years ago
mentioned in commit
ae257cbf
mentioned in commit ae257cbf08515af0e3bd593e2c5b08bed8711427
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment