S
S
SlavaMorg2021-06-23 08:44:51
1C
SlavaMorg, 2021-06-23 08:44:51

Why does an HTTP request to create an element of any directory in 1C give an error in the BeforeWrite handler?

Hello.
The task is to create directory elements using http requests to 1s.
Platform version - 1C: Enterprise 8.3 (8.3.19.1150)
Configuration - 1C: Management of a microfinance organization and a credit consumer cooperative PROF, edition 3.0 (3.0.91.31)

If they send requests to display the list, then everything works perfectly. If I send a POST request for creation, then an error is displayed: Error while executing the handler - 'BeforeWrite'. And no more details. No specific description, no line number. I'm attaching a screenshot of the error.
60d2ca3260684108211846.png
Tried both in json and xml format. Tried different sets of fields: full, which comes when requesting a list; Completely empty json object; and intermediate options. Tried to send requests to different directories. The error is always the same. Googled the problem but didn't find anything.
I'm not a 1c programmer, so I understood little in the source code from the source code. Before the problem arose, I did not change anything in the 1c code. Now I tried to comment out the contents of the BeforeRecord handler for a specific directory. This didn't help either.
Wrote in support, but there, as usual, they answer for a long time. Maybe there's something I don't know or don't understand.
Thank you in advance for your help.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
Konstantin Nagibovich, 2021-06-23
@nki

Look at the log, perhaps there is a more detailed description of the error.

D
Dmitry Kinash, 2021-06-23
@Dementor

0) View the registration log for errors
1) Check the rights. For the test, you can run a request under the admin account.
2) Check if there is a subscription to the BeforeWrite event and check its module. Pay attention to compilation directives and attempts to display interactive messages.
3) Set up wide logging using the technological log and analyze the logs.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question