Skip to content

Commit d679ee9

Browse files
authored
Merge pull request #13 from delphi-hub/bugfix/fix-return-code
When no matching instance is found the registry now returns 404
2 parents 2dfe279 + 6309967 commit d679ee9

File tree

1 file changed

+1
-1
lines changed
  • src/main/scala/de/upb/cs/swt/delphi/instanceregistry

1 file changed

+1
-1
lines changed

src/main/scala/de/upb/cs/swt/delphi/instanceregistry/Server.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ object Server extends HttpApp with JsonSupport with AppLogging {
111111
val matchingInstances = instances filter {instance => instance.componentType == compType}
112112
if(matchingInstances.isEmpty){
113113
log.warning(s"Could not find matching instance for type $compType .")
114-
complete(HttpResponse(StatusCodes.BadRequest, entity = s"Could not find matching instance for type $compType"))
114+
complete(HttpResponse(StatusCodes.NotFound, entity = s"Could not find matching instance for type $compType"))
115115
}
116116
else {
117117
val matchedInstance = matchingInstances.iterator.next()

0 commit comments

Comments
 (0)