![]() ![]() In this file, you may define all of your database connections, as well as specify which connection should be used by default. We support parsing the responses as text, json, blob, form-data and are parsed as text by default.The configuration for Laravel's database services is located in your application's config/database.php configuration file. We parse the response based on the Content-Type response header sent by the function. responseType does not need to be explicitly passed in.If it doesn’t match any of these we assume the payload is json, we serialise the payload as JSON and attach the content type as application/json. We automatically attach the content type for Blob, ArrayBuffer, File, FormData, String. The correct content-type headers are automatically attached when sending the request if you don’t pass in a Content-Type header and pass in an argument to your function.A FunctionsHttpError error is returned if your function throws an error, FunctionsRelayError if the Supabase Relay has an error processing your function and FunctionsFetchError if there is a network error in calling your function. We have introduced new error types to distinguish between different kinds of errors.We have changed this behaviour to return an error if your function throws an error. supabase-js v1 only threw an error if the fetch call itself threw an error (network errors, etc) and not if the function returned HTTP errors like 400s or 500s.It used to return type of Promise<).subscribe() in favor of new Realtime client API. RealtimeClient's disconnect method now returns type of void.RealtimeSubscription class no longer exists and replaced by RealtimeChannel.SupabaseStorageClient is no longer exported.Better error types make it easier to track down what went wrong quicker. ![]() createBucket returns a data object instead of the name of the bucket directly.Now we always return values only inside the data object across all methods. createsignedUrl used to return a url directly and and within the data object.Encodes URLs returned by createSignedUrl, createSignedUrls and getPublicUrl ( PR).signed urls are returned as signedUrl instead of signedURL in both createSignedUrl and createSignedUrls ( PR).No error is returned since this method cannot does not throw an error ( PR) This keeps it consistent with our other methods of returning only within the data object. getPublicURL only returns the public URL inside the data object.We also chose to call the returned value path instead of Key ( PR) Previously the returned value had the bucket name prepended to the path which made it harder to pass the value on to other storage-js methods since all methods take the bucket name and path separately. The upload and update function returns the path of the object uploaded as the path parameter.We now make use of union types which only mark the data as null if there is an error and vice versa. Functions types used to indicate that the data returned could be null even if there was no error. Removed signUpWithEmail, signUpWithPhone in favor of signUp.Removed signInWithEmail, signInWithPhone in favor of signInWithPassword.Removed sendMobileOTP, sendMagicLinkEmail in favor of signInWithOtp.Moved resetPasswordForEmail, getUser and updateUser to the GoTrueClient which means they will be accessible from the th namespace in supabase-js instead of having to do to access them.Renamed the api namespace to admin, the admin namespace will only contain methods that should only be used in a trusted server-side environment with the service role key.Indicates that the incorrect credentials were passed.Indicates that a cookie is expected but missing.Indicates that a session is expected but missing.No more throwing of random errors, gotrue-js v2 always returns a custom error type: ( PR).Deprecated and removed setting for multitab support because getSession() and gotrue’s reuse interval setting takes care of session management across multiple tabs ( PR). ![]() getSession() will always return a valid session if a user is already logged in, meaning no more random logouts.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |