Skip to content

Commit

Permalink
Update to empty default error code
Browse files Browse the repository at this point in the history
  • Loading branch information
kstich committed Jan 27, 2020
1 parent 270e7b3 commit e232e6d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ public void generateSharedComponents(GenerationContext context) {
// Default a 404 status code to the NotFound code.
writer.openBlock("if (output.statusCode == 404) {", "}", () -> writer.write("return 'NotFound';"));

// Default to an UnknownError code.
writer.write("return 'UnknownError';");
// Default to an empty error code so an unmodeled exception is built.
writer.write("return '';");
});
writer.write("");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ public void generateSharedComponents(GenerationContext context) {
// Default a 404 status code to the NotFound code.
writer.openBlock("if (output.statusCode == 404) {", "}", () -> writer.write("return 'NotFound';"));

// Default to an UnknownError code.
writer.write("return 'UnknownError';");
// Default to an empty error code so an unmodeled exception is built.
writer.write("return '';");
});
writer.write("");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ public void generateSharedComponents(GenerationContext context) {
// Default a 404 status code to the NotFound code.
writer.openBlock("if (output.statusCode == 404) {", "}", () -> writer.write("return 'NotFound';"));

// Default to an UnknownError code.
writer.write("return 'UnknownError';");
// Default to an empty error code so an unmodeled exception is built.
writer.write("return '';");
});
writer.write("");
}
Expand Down

0 comments on commit e232e6d

Please sign in to comment.