Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
157
Issues
157
List
Board
Labels
Milestones
Merge Requests
9
Merge Requests
9
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
haskell-gargantext
Commits
a50b228a
Commit
a50b228a
authored
Jun 03, 2024
by
Alfredo Di Napoli
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove NoUserFound error constructor
parent
144dce2d
Pipeline
#6185
failed with stages
in 6 minutes and 9 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
8 deletions
+0
-8
Errors.hs
src/Gargantext/API/Errors.hs
+0
-3
Error.hs
src/Gargantext/Database/Query/Table/Node/Error.hs
+0
-5
No files found.
src/Gargantext/API/Errors.hs
View file @
a50b228a
...
...
@@ -128,8 +128,6 @@ nodeErrorToFrontendError ne = case ne of
->
mkFrontendErrShow
FE_node_root_not_found
NoCorpusFound
->
mkFrontendErrShow
FE_node_corpus_not_found
NoUserFound
_ur
->
undefined
NodeCreationFailed
reason
->
case
reason
of
UserParentAlreadyExists
pId
uId
...
...
@@ -175,7 +173,6 @@ showAsServantJSONErr :: BackendInternalError -> ServerError
showAsServantJSONErr
(
InternalNodeError
err
@
(
NoListFound
{}))
=
err404
{
errBody
=
JSON
.
encode
err
}
showAsServantJSONErr
(
InternalNodeError
err
@
NoRootFound
{})
=
err404
{
errBody
=
JSON
.
encode
err
}
showAsServantJSONErr
(
InternalNodeError
err
@
NoCorpusFound
)
=
err404
{
errBody
=
JSON
.
encode
err
}
showAsServantJSONErr
(
InternalNodeError
err
@
NoUserFound
{})
=
err404
{
errBody
=
JSON
.
encode
err
}
showAsServantJSONErr
(
InternalNodeError
err
@
(
DoesNotExist
{}))
=
err404
{
errBody
=
JSON
.
encode
err
}
showAsServantJSONErr
(
InternalServerError
err
)
=
err
showAsServantJSONErr
a
=
err500
{
errBody
=
JSON
.
encode
a
}
src/Gargantext/Database/Query/Table/Node/Error.hs
View file @
a50b228a
...
...
@@ -73,7 +73,6 @@ renderNodeLookupFailed = \case
data
NodeError
=
NoListFound
ListId
|
NoRootFound
|
NoCorpusFound
|
NoUserFound
User
|
NodeCreationFailed
NodeCreationError
|
NodeLookupFailed
NodeLookupError
|
NotImplYet
...
...
@@ -88,7 +87,6 @@ instance Prelude.Show NodeError
show
(
NoListFound
{})
=
"No list found"
show
NoRootFound
=
"No root found"
show
NoCorpusFound
=
"No corpus found"
show
(
NoUserFound
ur
)
=
"User("
<>
T
.
unpack
(
renderUser
ur
)
<>
") not found"
show
(
NodeCreationFailed
reason
)
=
"Cannot make node due to: "
<>
T
.
unpack
(
renderNodeCreationFailed
reason
)
show
NotImplYet
=
"Not implemented yet"
...
...
@@ -108,9 +106,6 @@ instance ToJSON NodeError where
toJSON
(
NodeError
e
)
=
object
[
(
"error"
,
"Node error"
)
,
(
"exception"
,
toJSON
$
T
.
pack
$
show
e
)
]
toJSON
(
NoUserFound
ur
)
=
object
[
(
"error"
,
"No user found"
)
,
(
"user"
,
toJSON
ur
)
]
toJSON
(
NodeCreationFailed
reason
)
=
object
[
(
"error"
,
"Node creation failed"
)
,
(
"reason"
,
toJSON
reason
)
]
...
...
Przemyslaw Kaminski
@cgenie
mentioned in commit
5660aec0
·
Oct 08, 2024
mentioned in commit
5660aec0
mentioned in commit 5660aec07ec5a0a0a5468f440092c1a8f57a864e
Toggle commit list
Write
Preview
Markdown
is supported
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