Re: [patch] Raise InternalServerError whileretrieving table DDL

Поиск
Список
Период
Сортировка
От Ashesh Vashi
Тема Re: [patch] Raise InternalServerError whileretrieving table DDL
Дата
Msg-id CAG7mmozXoAcCEB1nmfm7aoFeHuNpSoGa27pmoBMv8NTgxSrstg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [patch] Raise InternalServerError whileretrieving table DDL  (Dave Page <dpage@pgadmin.org>)
Ответы Re: [patch] Raise InternalServerError whileretrieving table DDL  (Atira Odhner <aodhner@pivotal.io>)
Список pgadmin-hackers
On Fri, Mar 24, 2017 at 5:07 PM, Dave Page <dpage@pgadmin.org> wrote:
Ashesh, can you review/commit this please?

On Thu, Mar 23, 2017 at 3:49 PM, Joao Pedro De Almeida Pereira
<jdealmeidapereira@pivotal.io> wrote:
> Hi Hackers,
>
> While doing the DDL patch we found out that the code was not working
> properly when errors happened during SQL execution:
>
> One example of this can be found in the file:
>
> web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py
>
> The function '_formatter' that returns internal_server_error when an error
> occur executing SQL
> Nevertheless the 'sql' function uses the output of '_formatter' during the
> execution without checking it.
>
> To solve this issue we raise an InternalServerError exception that we catch
> in the 'sql' function instead of returning an error message.
Hi Joa & Sarah,

I am not against putting the try..except block.

We're already have out own version of 'internal_server_error', which will return value in JSON format.
But - I did not understand the reason to change them with 'werkzeug.exceptions.InternalServerError'.

Can you please elaborate about that change?


-- Thanks, Ashesh

>
>
> Thanks
> Joao & Sarah
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>



--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

В списке pgadmin-hackers по дате отправления:

Предыдущее
От: Dave Page
Дата:
Сообщение: Re: Last few steps for pgadmin4 on RHEL 6
Следующее
От: Atira Odhner
Дата:
Сообщение: Re: Re-vamping the history tab