Skip to content

Commit

Permalink
Better error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielFillol committed Oct 12, 2022
1 parent d65cc47 commit f817bfd
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion CNJ/decomposer.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,17 @@ func DecomposeCNJ(cnj string) (DecomposedCNJ, error) {

dt, err := CNJDatabase.FetchDistrict(semiCNJ)
if err != nil {
return DecomposedCNJ{}, err
return DecomposedCNJ{
LawsuitNumber: lawsuitNumber,
VerifyingDigit: verifyingDigit,
ProtocolYear: yearProtocol,
Segment: segment,
Court: court,
SourceUnit: sourceUnit,
ArgNumber: argNumber,
District: err.Error(),
UF: err.Error(),
}, err
}

return DecomposedCNJ{
Expand Down

0 comments on commit f817bfd

Please sign in to comment.