You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
com.smartling.api.v2.client.exception.client.ValidationErrorException: http_status=400, requestId=daedf180-7ea3-4651-92ba-847c777f4d58, top errors: 'File is required'
at com.smartling.api.v2.client.exception.DefaultRestApiExceptionMapper.toExceptionByStatus(DefaultRestApiExceptionMapper.java:89)
at com.smartling.api.v2.client.exception.DefaultRestApiExceptionMapper.toException(DefaultRestApiExceptionMapper.java:44)
at com.smartling.api.files.v2.exceptions.FilesApiExceptionMapper.toException(FilesApiExceptionMapper.java:44)
at com.smartling.api.v2.client.exception.RestApiExceptionHandler.createRestApiException(RestApiExceptionHandler.java:31)
at com.smartling.api.v2.client.ExceptionDecoratorInvocationHandler.invoke(ExceptionDecoratorInvocationHandler.java:34)
at com.sun.proxy.$Proxy101.importTranslations(Unknown Source)
[my service stack trace]
Caused by: javax.ws.rs.BadRequestException: HTTP 400 Bad Request
at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.handleErrorStatus(ClientInvocation.java:220)
at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.extractResult(ClientInvocation.java:196)
at org.jboss.resteasy.client.jaxrs.internal.proxy.extractors.BodyEntityExtractor.extractEntity(BodyEntityExtractor.java:62)
at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invokeSync(ClientInvoker.java:151)
at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invoke(ClientInvoker.java:112)
at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientProxy.invoke(ClientProxy.java:76)
at com.sun.proxy.$Proxy100.importTranslations(Unknown Source)
at jdk.internal.reflect.GeneratedMethodAccessor349.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.smartling.api.v2.client.ExceptionDecoratorInvocationHandler.invoke(ExceptionDecoratorInvocationHandler.java:30)
... 32 common frames omitted
Executing the code again usually helps, but I'd like to avoid that error in the first place. What does this error actually mean and how can we avoid getting it?
The text was updated successfully, but these errors were encountered:
'File is required' is returned by the Files API when the file parameter is not provided or doesn't have content
Please ensure that JACKSON_OBJECT_MAPPER.writeValueAsString(myDTOWithStrings) returns any content and stream variable is not read between instantiation and calling filesApi.importTranslations()
It might be helpful to log serialized requests made by SDK using logging filter, so we could know if SDK sends an empty file or an API interpret non-empty file as empty
We are using smartling java sdk 0.18 to upload dynamically generated json files to smartling.
We use FilesAPI for that like this:
Quite often we get the exception:
Executing the code again usually helps, but I'd like to avoid that error in the first place. What does this error actually mean and how can we avoid getting it?
The text was updated successfully, but these errors were encountered: