File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -164,15 +164,15 @@ protected function checkResponseForErrors($response): void
164164 $ code = (int ) $ message ['code ' ];
165165
166166 if ($ code !== 0 ) {
167- switch ($ code ) {
168- case 105 :
169- // Layout is missing error
170- // Add the layout name to the message for clarity
171- $ message = $ message ['message ' ] . ': ' . $ this ->getLayout ();
172- throw new FileMakerDataApiException ($ message , $ code );
173- default :
174- throw new FileMakerDataApiException ($ message ['message ' ], $ code );
167+
168+ // If the layout is not the same as the table prefix, a layout has been specified and we
169+ // should to add the layout name for clarity
170+ if ($ this ->layout ) {
171+ $ customMessage = 'Layout: ' . $ this ->getLayout () . ' - ' . $ message ['message ' ];
172+ } else {
173+ $ customMessage = $ message ['message ' ];
175174 }
175+ throw new FileMakerDataApiException ($ customMessage , $ code );
176176 }
177177 }
178178 } else {
You can’t perform that action at this time.
0 commit comments