Class EFhirClientException

  • All Implemented Interfaces:
    Serializable

    public class EFhirClientException
    extends RuntimeException
    FHIR client exception. FHIR API exception will be wrapped in FHIR client exceptions. OperationOutcome errors resulting from the server can be access by calling:
     
     if(e.hasServerErrors()) {
            List errors = e.getServerErrors();
      //process errors...
     }
     
     
    Author:
    Claude Nanjo
    See Also:
    Serialized Form
    • Constructor Detail

      • EFhirClientException

        public EFhirClientException​(int code,
                                    String message,
                                    OperationOutcome serverError)
        Generate EFhirClientException which include a message indicating the cause of the exception along with any OperationOutcome server error that may have resulted.
        Parameters:
        message -
        serverError -
      • EFhirClientException

        public EFhirClientException​(int code,
                                    OperationOutcome serverError)
        Generate EFhirClientException indicating the cause of the exception along with any OperationOutcome server error the server may have generated. A default message of "One or more server side errors have occurred during this operation. Refer to e.getServerErrors() for additional details." will be returned to users.
        Parameters:
        serverError -
    • Method Detail

      • hasServerErrors

        public boolean hasServerErrors()
        Method returns true if exception contains server OperationOutcome errors in payload.
        Returns: