File tree Expand file tree Collapse file tree 4 files changed +14
-7
lines changed
app/GraphQL/Mutation/Artist Expand file tree Collapse file tree 4 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -112,10 +112,8 @@ MaxKeepAliveRequests 100
112112#
113113KeepAliveTimeout 5
114114
115-
116- # These need to be set in /etc/apache2/envvars
117- User ${APACHE_RUN_USER}
118- Group ${APACHE_RUN_GROUP}
115+ User www-data
116+ Group www-data
119117
120118#
121119# HostnameLookups: Log the names of clients or just their IP addresses
Original file line number Diff line number Diff line change @@ -75,8 +75,10 @@ RUN composer install --no-dev
7575RUN touch /var/www/storage/logs/laravel.log && \
7676 rm /var/www/storage/logs/laravel.log && \
7777 touch /var/www/storage/logs/laravel.log
78- RUN chgrp -R www-data storage bootstrap/cache database/database.sqlite
79- RUN chmod -R ug+rwx storage bootstrap/cache database/database.sqlite
78+ RUN chgrp -R www-data storage bootstrap/cache
79+ RUN chmod -R ug+rwx storage bootstrap/cache
80+ RUN chgrp -R www-data database/database.sqlite
81+ RUN chmod -R ug+rwx database/database.sqlite
8082
8183# Expose port
8284EXPOSE 8080
Original file line number Diff line number Diff line change 99use App \GraphQL \Field ;
1010use Doctrine \Laminas \Hydrator \DoctrineObject ;
1111use Doctrine \ORM \EntityManager ;
12+ use GraphQL \Error \Error ;
1213use GraphQL \Type \Definition \ResolveInfo ;
14+ use Throwable ;
1315
1416class Create implements Field
1517{
@@ -33,7 +35,12 @@ public static function getDefinition(
3335
3436 $ driver ->get (DoctrineObject::class)->hydrate ($ args ['values ' ], $ artist );
3537 $ driver ->get (EntityManager::class)->persist ($ artist );
36- $ driver ->get (EntityManager::class)->flush ();
38+
39+ try {
40+ $ driver ->get (EntityManager::class)->flush ();
41+ } catch (Throwable $ e ) {
42+ throw new Error ($ e ->getMessage ());
43+ }
3744
3845 return $ artist ;
3946 },
You can’t perform that action at this time.
0 commit comments