Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Open Subsurface Data Universe Software
Platform
Domain Data Mgmt Services
Seismic
Seismic DMS Suite
seismic-dms-service
Commits
c54c9c4e
Commit
c54c9c4e
authored
Nov 09, 2021
by
Diego Molteni
Browse files
feat: silent error for probes
parent
22d8d3b2
Pipeline
#76276
passed with stages
in 3 minutes and 31 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
app/sdms/src/server/server.ts
View file @
c54c9c4e
...
...
@@ -139,6 +139,10 @@ export class Server {
}
}
// disable silent error logs
res
.
locals
[
'
disabled_error_logs
'
]
=
req
.
query
[
'
silent
'
]
?
req
.
query
[
'
silent
'
]
===
'
silent_for_errors
'
:
false
;
// If required, exchange the caller credentials to include the DE target audience
if
(
Config
.
ENABLE_DE_TOKEN_EXCHANGE
)
{
if
(
Config
.
DES_TARGET_AUDIENCE
)
{
...
...
app/sdms/src/shared/response.ts
View file @
c54c9c4e
...
...
@@ -32,12 +32,12 @@ export class Response {
err
.
error
.
code
:
typeof
(
err
.
code
)
===
'
number
'
?
err
.
code
:
500
;
const
message
=
typeof
(
err
.
error
)
===
'
object
'
&&
typeof
(
err
.
error
.
message
)
===
'
string
'
?
err
.
error
.
message
:
typeof
(
err
.
message
)
===
'
string
'
?
err
.
message
:
err
;
if
(
FeatureFlags
.
isEnabled
(
Feature
.
LOGGING
))
{
if
(
FeatureFlags
.
isEnabled
(
Feature
.
LOGGING
)
&&
res
.
locals
[
'
disabled_error_logs
'
]
!==
true
)
{
LoggerFactory
.
build
(
Config
.
CLOUDPROVIDER
).
error
(
JSON
.
stringify
(
err
));
}
this
.
write
(
res
,
code
<
100
?
500
:
code
,
message
);
}
else
{
if
(
FeatureFlags
.
isEnabled
(
Feature
.
LOGGING
))
{
if
(
FeatureFlags
.
isEnabled
(
Feature
.
LOGGING
)
&&
res
.
locals
[
'
disabled_error_logs
'
]
!==
true
)
{
LoggerFactory
.
build
(
Config
.
CLOUDPROVIDER
).
error
(
'
Unexpected Error
'
);
}
this
.
write
(
res
,
500
,
'
Internal Server Error
'
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment