<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Ramiro,<div class=""><br class=""></div><div class="">the endpoint requires a region where the end is greater than the start. I will also add a better error handling to that endpoint. Thank you very much for reporting this.</div><div class=""><br class=""></div><div class="">Anja<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 18 Jul 2019, at 12:07, Ramiro Magno <<a href="mailto:ramiro.magno@gmail.com" class="">ramiro.magno@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Inverting the genomic positions also gives that 500 error from Example 3:<div class=""><br class=""></div><div class=""><a href="https://rest.ensembl.org/ld/human/region/1:100000..1/1000GENOMES:phase_3:CEU?d_prime=0;r2=0" class="">https://rest.ensembl.org/ld/human/region/1:100000..1/1000GENOMES:phase_3:CEU?d_prime=0;r2=0</a><br class=""></div><div class=""><br class=""></div><div class="">RM</div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 18 Jul 2019 at 12:04, Ramiro Magno <<a href="mailto:ramiro.magno@gmail.com" class="">ramiro.magno@gmail.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" class="">Hi<div class=""><br class=""></div><div class="">What should I expect when using this endpoint with other species than human:</div><div class=""><br class=""></div><div class=""><a href="http://rest.ensembl.org/documentation/info/ld_region_get" target="_blank" class="">http://rest.ensembl.org/documentation/info/ld_region_get</a><br class=""></div><div class=""><br class=""></div><div class="">The returned errors do not seem to be consistent. Some expose internal errors even. I was expecting some error more specifically related to the invalid parameter.</div><div class=""><br class=""></div><div class="">Here's some examples:</div><div class=""><br class=""></div><div class=""><b class="">Example 1</b></div><div class=""><br class=""></div><div class=""><font face="courier new, monospace" class="">* Endpoint:       <a href="https://rest.ensembl.org/ld/gorilla/rs1042779/1000GENOMES:phase_3:CEU?window_size=50;d_prime=0;r2=0" target="_blank" class="">https://rest.ensembl.org/ld/gorilla/rs1042779/1000GENOMES:phase_3:CEU?window_size=50;d_prime=0;r2=0</a><br class="">* Status code:    400<br class="">* Error message: "Can't call method "max_snp_distance" on an undefined value at /nfs/public/release/ensweb/live/rest/www_97/ensembl-rest/lib/EnsEMBL/REST/Model/LDFeatureContainer.pm line 50.</font><br class=""></div><div class=""><br class=""></div><div class=""><b class="">Example 2</b></div><div class=""><br class=""></div><div class=""><font face="courier new, monospace" class="">* Endpoint:       <a href="https://rest.ensembl.org/ld/gorilla/region/1:1..10000/1000GENOMES:phase_3:CEU?d_prime=0;r2=0" target="_blank" class="">https://rest.ensembl.org/ld/gorilla/region/1:1..10000/1000GENOMES:phase_3:CEU?d_prime=0;r2=0</a><br class="">* Status code:    400<br class="">* Error message: "Can't call method "db" on an undefined value at /nfs/public/release/ensweb/live/rest/www_97/ensembl-rest/lib/EnsEMBL/REST/Model/LDFeatureContainer.pm line 92.</font><br class=""></div><div class=""><br class=""></div><div class=""><b class="">Example 3</b></div><div class=""><br class=""></div><div class=""><font face="courier new, monospace" class="">* Endpoint: <a href="https://rest.ensembl.org/ld/fly/region/1:1..10000/1000GENOMES:phase_3:CEU?d_prime=0;r2=0" target="_blank" class="">https://rest.ensembl.org/ld/fly/region/1:1..10000/1000GENOMES:phase_3:CEU?d_prime=0;r2=0</a></font></div><div class=""><font face="courier new, monospace" class="">* Status code: 500</font></div><div class=""><font face="courier new, monospace" class="">* Error message:  Error: lexical error: invalid char in json text.</font></div><font face="courier new, monospace" class="">                                       <!DOCTYPE html>    <html lang="<br class="">                     (right here) ------^</font><div class=""><br class=""></div><div class="">Cheers,</div><div class="">RM</div></div>
</blockquote></div>
_______________________________________________<br class="">Dev mailing list    <a href="mailto:Dev@ensembl.org" class="">Dev@ensembl.org</a><br class="">Posting guidelines and subscribe/unsubscribe info: <a href="https://lists.ensembl.org/mailman/listinfo/dev_ensembl.org" class="">https://lists.ensembl.org/mailman/listinfo/dev_ensembl.org</a><br class="">Ensembl Blog: <a href="http://www.ensembl.info/" class="">http://www.ensembl.info/</a><br class=""></div></blockquote></div><br class=""></div></body></html>