-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #278 from EasyPost/bad_request_error
feat: maps 400 status codes to BadRequestError class
- Loading branch information
Showing
5 changed files
with
120 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
src/main/java/com/easypost/exception/API/BadRequestError.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.easypost.exception.API; | ||
|
||
import java.util.List; | ||
|
||
import com.easypost.model.Error; | ||
import com.easypost.exception.APIException; | ||
|
||
public class BadRequestError extends APIException { | ||
/** | ||
* BadRequestError constructor. | ||
* | ||
* @param message the exception message | ||
* @param code the exception code | ||
* @param statusCode the exception status code | ||
* @param errors the errors array | ||
*/ | ||
public BadRequestError(final String message, final String code, final int statusCode, List<Error> errors) { | ||
super(message, code, statusCode, errors); | ||
} | ||
} |
Oops, something went wrong.