Class DirectorErrorResponseBuilder
java.lang.Object
com.creativityfactory.swiftserver.error.DirectorErrorResponseBuilder
This class is responsible for constructing an
ErrorResponse
object using the builder pattern
and setting default values for the error field based on the given status code.-
Constructor Summary
ConstructorDescriptionDirectorErrorResponseBuilder
(ErrorMessageBuilder messageBuilder) Creates a new instance of DirectorErrorResponseBuilder with a given ErrorMessageBuilder. -
Method Summary
-
Constructor Details
-
DirectorErrorResponseBuilder
Creates a new instance of DirectorErrorResponseBuilder with a given ErrorMessageBuilder.- Parameters:
messageBuilder
- the implementation of ErrorMessageBuilder to use
-
-
Method Details
-
make
Builds an ErrorResponse object with the given parameters and default values for the error field based on the given status code.- Parameters:
code
- the HTTP status codepath
- the request pathmessage
- the error message
-