-
Notifications
You must be signed in to change notification settings - Fork 1
#[222] No info to user about invalid regex #253
Changes from 1 commit
51dcc95
2fb2903
4b25da4
8424a36
055491d
4fccd3a
06b1d8c
da623ec
43ea7c1
61bc938
0662fe1
226c345
d1c9125
4fa55fa
5ae9c6c
9bcc0f6
71e262a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -49,12 +49,13 @@ trait Search { | |
| .toList | ||
| } yield CSearchPage(results.sortBy(_.pack.name), entity.lists.size, ErrorResponse("")) | ||
| } | ||
| case scala.util.Failure(exception) => | ||
| { | ||
| val message = exception.getMessage | ||
| IO(CSearchPage(Seq.empty[Search.PackageResult], 0, | ||
| ErrorResponse(message.substring(0,1).toUpperCase + message.substring(1, message.size)))) | ||
| } | ||
| case scala.util.Failure(exception) => { | ||
| val message = exception.getMessage | ||
| IO( | ||
| CSearchPage(Seq.empty[Search.PackageResult], | ||
| 0, | ||
| ErrorResponse(message.substring(0, 1).toUpperCase + message.substring(1, message.size)))) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Does Scala have a linter that catches those things? (Also it's
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @neongreen
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I meant a linter that we can run during CI. I have just tried to run SonarQube on our code, but it didn't find the |
||
| } | ||
| } | ||
| } | ||
|
|
||
|
|
||

Uh oh!
There was an error while loading. Please reload this page.