Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.

Android request to server always error code 499 #119

Open
boykoy96bg opened this issue Jul 12, 2021 · 1 comment
Open

Android request to server always error code 499 #119

boykoy96bg opened this issue Jul 12, 2021 · 1 comment
Assignees
Labels
help wanted Extra attention is needed

Comments

@boykoy96bg
Copy link

boykoy96bg commented Jul 12, 2021

Can you tell me the cause ?
Server Version : (Server v4xx)

Client Version : (Android v4xx)
Send any request to receive the error code 499
The server works fine when calling postman

private Response makeServiceRequest(String urlFragment,
String method,
RequestBody body,
Map<String, String> headers,
ResponseCodeHandler responseCodeHandler,
Optional unidentifiedAccessKey)
throws NonSuccessfulResponseCodeException, PushNetworkException
{
Response response = getServiceConnection(urlFragment, method, body, headers, unidentifiedAccessKey);

responseCodeHandler.handle(response.code());

return validateServiceResponse(response);

}

@boykoy96bg boykoy96bg added the help wanted Extra attention is needed label Jul 12, 2021
@boykoy96bg
Copy link
Author

@OverRide
public @nonnull Response intercept(@nonnull Chain chain) throws IOException {
if (SignalStore.misc().isClientDeprecated()) {
Log.w(TAG, "Preventing request because client is deprecated.");
return new Response.Builder()
.request(chain.request())
.protocol(Protocol.HTTP_1_1)
.receivedResponseAtMillis(System.currentTimeMillis())
.message("")
.body(ResponseBody.create(null, ""))
.code(499)
.build();
} else {
return chain.proceed(chain.request());
}
}
this is cause but i don't fix

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants