-
Notifications
You must be signed in to change notification settings - Fork 160
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 #2434 from IBM/tbieste-issue-896
Issue #896 - Add checking for MIME-type parameter fhirVersion
- Loading branch information
Showing
7 changed files
with
320 additions
and
14 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
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
37 changes: 37 additions & 0 deletions
37
fhir-server/src/main/java/com/ibm/fhir/server/exception/FHIRRestServletRequestException.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,37 @@ | ||
/* | ||
* (C) Copyright IBM Corp. 2021 | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package com.ibm.fhir.server.exception; | ||
|
||
import javax.servlet.http.HttpServletResponse; | ||
|
||
import com.ibm.fhir.exception.FHIROperationException; | ||
|
||
public class FHIRRestServletRequestException extends FHIROperationException { | ||
private static final long serialVersionUID = 1L; | ||
private int httpStatusCode = HttpServletResponse.SC_BAD_REQUEST; | ||
|
||
public FHIRRestServletRequestException(String message) { | ||
super(message); | ||
} | ||
|
||
public FHIRRestServletRequestException(String message, Throwable cause) { | ||
super(message, cause); | ||
} | ||
|
||
public FHIRRestServletRequestException(String message, int httpStatusCode) { | ||
this(message, httpStatusCode, null); | ||
} | ||
|
||
public FHIRRestServletRequestException(String message, int httpStatusCode, Throwable t) { | ||
super(message, t); | ||
this.httpStatusCode = httpStatusCode; | ||
} | ||
|
||
public int getHttpStatusCode() { | ||
return httpStatusCode; | ||
} | ||
} |
Oops, something went wrong.