comparison Core/RestApi/RestApiOutput.cpp @ 1194:7d2c8d28ad87

generalization
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 23 Oct 2014 13:12:23 +0200
parents 0561f2087cc9
children 6e7e5ed91c2d
comparison
equal deleted inserted replaced
1193:e95e7f9eba96 1194:7d2c8d28ad87
126 alreadySent_ = true; 126 alreadySent_ = true;
127 } 127 }
128 128
129 void RestApiOutput::SignalError(HttpStatus status) 129 void RestApiOutput::SignalError(HttpStatus status)
130 { 130 {
131 if (status != HttpStatus_403_Forbidden && 131 if (status != HttpStatus_400_BadRequest &&
132 status != HttpStatus_403_Forbidden &&
132 status != HttpStatus_500_InternalServerError && 133 status != HttpStatus_500_InternalServerError &&
133 status != HttpStatus_415_UnsupportedMediaType) 134 status != HttpStatus_415_UnsupportedMediaType)
134 { 135 {
135 throw OrthancException("This HTTP status is not allowed in a REST API"); 136 throw OrthancException("This HTTP status is not allowed in a REST API");
136 } 137 }