Clarify some items thanks to users feedback

This commit is contained in:
Maxime Dor
2017-10-01 00:06:03 +02:00
parent 88a37c52c0
commit 8d0b0edad2
2 changed files with 6 additions and 3 deletions

View File

@@ -3,12 +3,12 @@
- For SQL: Use `synapseSql` module with `type: {sqlite|postgresql}` and `database` as JDBC url after `jdbc:driver:` - For SQL: Use `synapseSql` module with `type: {sqlite|postgresql}` and `database` as JDBC url after `jdbc:driver:`
- `/path/to/db` for `sqlite` - `/path/to/db` for `sqlite`
- `//host/db?username...` for `postgresql`) - `//host/db?username...` for `postgresql`)
- Configure DNS overwrite for domain name (and mention ${matrix.domain} can be used) - Configure DNS overwrite for the Homeserver hostname used when connecting as a client (and mention ${matrix.domain} can be used)
``` ```
dns.overwrite.homeserver.client: dns.overwrite.homeserver.client:
- name: 'example.org' - name: 'example.org'
value: 'http://localhost:8008' value: 'http://localhost:8008'
``` ```
- Configure reverse proxy - Configure reverse proxy
- for `/_matrix/client/r0/user_directory/search` to `http://internalIp:8008/_matrix/client/r0/user_directory/search` - for `/_matrix/client/r0/user_directory/search` to `http://internalIpOfMxisd:8090/_matrix/client/r0/user_directory/search`
- With `ProxyPreserveHost on` on apache - With `ProxyPreserveHost on` on apache

View File

@@ -21,6 +21,7 @@
package io.kamax.mxisd.directory; package io.kamax.mxisd.directory;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.google.gson.JsonSyntaxException;
import io.kamax.matrix.MatrixErrorInfo; import io.kamax.matrix.MatrixErrorInfo;
import io.kamax.mxisd.controller.directory.v1.io.UserDirectorySearchRequest; import io.kamax.mxisd.controller.directory.v1.io.UserDirectorySearchRequest;
import io.kamax.mxisd.controller.directory.v1.io.UserDirectorySearchResult; import io.kamax.mxisd.controller.directory.v1.io.UserDirectorySearchResult;
@@ -96,8 +97,10 @@ public class DirectoryManager {
if (resultHs.isLimited()) { if (resultHs.isLimited()) {
result.setLimited(true); result.setLimited(true);
} }
} catch (JsonSyntaxException e) {
throw new InternalServerError("Invalid JSON reply from the HS: " + e.getMessage());
} catch (IOException e) { } catch (IOException e) {
throw new InternalServerError(e); throw new InternalServerError("Unable to query the HS: I/O error: " + e.getMessage());
} }
for (IDirectoryProvider provider : providers) { for (IDirectoryProvider provider : providers) {