Skip to content

Commit

Permalink
NOT_FOUND for send means: Reported Object was not registered to Server
Browse files Browse the repository at this point in the history
  • Loading branch information
sbernard31 committed Jul 17, 2023
1 parent 42bda55 commit 7459ed3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
package org.eclipse.leshan.integration.tests.send;

import static org.assertj.core.api.Assertions.assertThat;
import static org.eclipse.leshan.core.ResponseCode.NOT_FOUND;
import static org.eclipse.leshan.core.ResponseCode.BAD_REQUEST;
import static org.eclipse.leshan.integration.tests.util.Credentials.GOOD_PSK_ID;
import static org.eclipse.leshan.integration.tests.util.Credentials.GOOD_PSK_KEY;
import static org.eclipse.leshan.integration.tests.util.Credentials.clientPrivateKey;
Expand Down Expand Up @@ -142,7 +142,7 @@ public void can_not_send_if_client_ip_changes(Protocol givenProtocol, String giv
Arrays.asList("/3/0/1", "/3/0/2"), 1000);

// it should failed !
assertThat(response).hasCode(NOT_FOUND);
assertThat(response).hasCode(BAD_REQUEST);
}

// TODO OSCORE implement a test with OSCORE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public void handlePOST(CoapExchange exchange) {

// check we have a registration for this identity
if (clientProfile == null) {
exchange.respond(ResponseCode.NOT_FOUND, "no registration found");
exchange.respond(ResponseCode.BAD_REQUEST, "no registration found");
return;
}

Expand Down

0 comments on commit 7459ed3

Please sign in to comment.